2) Renamed crm_profiling/test/test_crm_segmentation.yml => crm_profiling/test/process/segmentation.yml,
2) Improved segmentation.yml,
3) Updated __openerp__.py
bzr revid: ron@tinyerp.com-
20111021052456-1exoucyc5134qute
'update_xml': ['security/ir.model.access.csv', 'wizard/open_questionnaire_view.xml', 'crm_profiling_view.xml'],
'demo_xml': ['crm_profiling_demo.xml'],
'test': [#'test/process/profiling.yml', #TODO:It's not debuging because problem to write data for open.questionnaire from partner section.
- 'test/test_crm_segmentation.yml',],
+ 'test/process/segmentation.yml',],
'installable': True,
'active': False,
'certificate': '0033984979005',
<field name="answer_yes" eval="[(6,0,[partner_quality3])]" />
<field name="parent_id" ref="crm_segmentation0"/>
<field name="categ_id" ref="base.res_partner_category_5"/>
+ <field name="exclusif">True</field>
<field name="profiling_active">True</field>
</record>
<record model="crm.segmentation" id="crm_segmentation4">
--- /dev/null
+-
+ In order to test segmentation process which create specific partner categories criteria.so i start
+ the process.
+-
+ !python {model: crm.segmentation}: |
+ self.process_start(cr, uid, [ref("crm_segmentation3")],context)
+ #Todo: Need to check after segmentation started
+-
+ I continue the segmentation process.
+-
+ !python {model: crm.segmentation}: |
+ context.update({'start': True})
+ self.process_continue(cr, uid, [ref("crm_segmentation3")], context)
+ #Todo: Need to check After segmentation process completed
\ No newline at end of file
+++ /dev/null
-- |
- I will test segmentation which create specific partner categories criteria.
--
- I create a new segmentation record.
--
- !record {model: crm.segmentation, id: crm_segmentation_id_0}:
- categ_id: base.res_partner_category_5
- exclusif: true
- name: segment
- som_interval: 0.0
- sales_purchase_active : True
--
- I start the process.
--
- !python {model: crm.segmentation}: |
- self.process_start(cr, uid, [ref("crm_segmentation_id_0")],context)
--
- I continue the segmentation process.
--
- !python {model: crm.segmentation}: |
- context.update({'start': True})
- self.process_continue(cr, uid, [ref("crm_segmentation_id_0")], context)
--
- I create the segmentation line.
--
- !record {model: crm.segmentation.line, id: crm_segmentation_line_id_0}:
- expr_name: sale
- expr_operator: '>'
- expr_value: 1000.0
- name: Rule1
- operator: or
- segmentation_id: crm_segmentation_id_0
-
--
- I check the Segmentation line record.
--
- !python {model: crm.segmentation.line}: |
- self.test(cr, uid, [ref("crm_segmentation_line_id_0")],partner_id=0)