summaryrefslogtreecommitdiff
path: root/addons/crm_profiling/test/process/profiling.yml
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2011-12-14 17:59:24 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2011-12-14 17:59:24 +0530
commit092f97b32b35af6a40b9d2ae70c3159da2fb235f (patch)
tree2974d3719af9338cd0b1814da900d7e9ca8d4779 /addons/crm_profiling/test/process/profiling.yml
parent593f5f571bbc49673975afc405e9345ef3457b92 (diff)
parente36dc8c5e3ca3da1474747bae5ec87fea19b23b8 (diff)
[MERGE] merged with trunk-development-branch
bzr revid: hmo@tinyerp.com-20111214122924-izzibrz1yz67rt7g
Diffstat (limited to 'addons/crm_profiling/test/process/profiling.yml')
-rw-r--r--addons/crm_profiling/test/process/profiling.yml69
1 files changed, 69 insertions, 0 deletions
diff --git a/addons/crm_profiling/test/process/profiling.yml b/addons/crm_profiling/test/process/profiling.yml
new file mode 100644
index 00000000000..99fe2da1733
--- /dev/null
+++ b/addons/crm_profiling/test/process/profiling.yml
@@ -0,0 +1,69 @@
+- |
+ I check segmentation which allows users to perform segmentation within partners.
+-
+ I create a crm profiling question record.
+-
+ !record {model: crm_profiling.question, id: crm_profiling_question_openerppartner0}:
+ answers_ids:
+ - name: 'no'
+ name: OpenERP partner?
+-
+ I create a crm profiling answer record.
+-
+ !record {model: crm_profiling.answer, id: crm_profiling_answer_openerppartner0}:
+ name: 'yes'
+ question_id: crm_profiling_question_openerppartner0
+-
+ I create Partner category Customers.
+-
+ !record {model: res.partner.category, id: res_partner_category_customers0}:
+ name: Customers
+- |
+ I'm creating new partner "John" with his email "info@mycustomer.com".
+-
+ !record {model: res.partner, id: res_partner_john0}:
+ address:
+ - city: Bruxelles
+ country_id: base.be
+ street: Rue des Palais 51, bte 33
+ type: default
+ zip: '1000'
+ email: 'info@mycustomer.com'
+ name: John
+ category_id:
+ - res_partner_category_customers0
+
+-
+ Define the answers and category to partner.
+-
+ !python {model: res.partner}: |
+ data ={'form': {'questionnaire_name': ref('res_partner_john0')}, 'ids': [ref('res_partner_john0')], 'report_type': 'pdf', 'model': 'res.partner', 'id': ref('res_partner_john0')}
+ context['active_id'] = ref('res_partner_john0')
+ self._questionnaire_compute(cr, uid, [ref('crm_profiling_answer_openerppartner0')], context)
+- |
+ I start by creating new Questionnaire.
+-
+ !record {model: crm_profiling.questionnaire, id: crm_profiling_questionnaire_basequestionnaire0}:
+ description: First questionnaire.
+ name: Base questionnaire
+ questions_ids:
+ - crm_profiling.activity_sector
+ - crm_profiling.nb_employees
+ - crm_profiling.partner_level
+-
+ I create a segmentation record.
+-
+ !record {model: crm.segmentation, id: crm_segmentation_test1}:
+ answer_yes:
+ - crm_profiling_answer_openerppartner0
+ categ_id: res_partner_category_customers0
+ name: test
+ parent_id: crm_profiling.crm_segmentation0
+ profiling_active: true
+ som_interval: 0.0
+- |
+ I continue the process of segmentation.
+-
+ !python {model: crm.segmentation}: |
+ self.process_continue(cr, uid, [ref('crm_segmentation_test1')], start=False)
+