From c650f6eac93b8986fae89145d0cd14a67867aadd Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 21 Oct 2011 10:54:56 +0530 Subject: [PATCH] [IMP, MOVE, REN] crm_profiling: 1) Updated crm_profiling/crm_profiling_demo.xml(Added Exclusive field value True) 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 --- addons/crm_profiling/__openerp__.py | 2 +- addons/crm_profiling/crm_profiling_demo.xml | 1 + .../test/process/segmentation.yml | 14 +++++++ .../test/test_crm_segmentation.yml | 38 ------------------- 4 files changed, 16 insertions(+), 39 deletions(-) create mode 100644 addons/crm_profiling/test/process/segmentation.yml delete mode 100644 addons/crm_profiling/test/test_crm_segmentation.yml diff --git a/addons/crm_profiling/__openerp__.py b/addons/crm_profiling/__openerp__.py index 1ae45b526ca..1c78859ecb6 100644 --- a/addons/crm_profiling/__openerp__.py +++ b/addons/crm_profiling/__openerp__.py @@ -42,7 +42,7 @@ It also has been merged with the earlier CRM & SRM segmentation tool because the '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', diff --git a/addons/crm_profiling/crm_profiling_demo.xml b/addons/crm_profiling/crm_profiling_demo.xml index 1789e8bace8..e541c116265 100644 --- a/addons/crm_profiling/crm_profiling_demo.xml +++ b/addons/crm_profiling/crm_profiling_demo.xml @@ -127,6 +127,7 @@ + True True diff --git a/addons/crm_profiling/test/process/segmentation.yml b/addons/crm_profiling/test/process/segmentation.yml new file mode 100644 index 00000000000..136bdf5e872 --- /dev/null +++ b/addons/crm_profiling/test/process/segmentation.yml @@ -0,0 +1,14 @@ +- + 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 diff --git a/addons/crm_profiling/test/test_crm_segmentation.yml b/addons/crm_profiling/test/test_crm_segmentation.yml deleted file mode 100644 index 5563f1ce52f..00000000000 --- a/addons/crm_profiling/test/test_crm_segmentation.yml +++ /dev/null @@ -1,38 +0,0 @@ -- | - 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)