diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py index 44a2f1e30bd..d9052239038 100644 --- a/addons/marketing_campaign/__openerp__.py +++ b/addons/marketing_campaign/__openerp__.py @@ -58,7 +58,12 @@ Note: If you need demo data, you can install the marketing_campaign_crm_demo mod "security/ir.model.access.csv" ], 'demo_xml': [ + 'marketing_campaign_demo.xml', ], + 'test': [ + 'test/marketing_campaign_demo.yml', + 'test/marketing_campaign.yml', + ], 'installable': True, 'active': False, 'certificate' : '00421723279617928365', diff --git a/addons/marketing_campaign/marketing_campaign_demo.xml b/addons/marketing_campaign/marketing_campaign_demo.xml new file mode 100644 index 00000000000..f49b918aa2c --- /dev/null +++ b/addons/marketing_campaign/marketing_campaign_demo.xml @@ -0,0 +1,91 @@ + + + + + Dummy Action + + dummy + + + + + + + + + Welcome in OpenERP Family! + info@tinyerp.com + + Hello, We are very happy to send Welcome message. + + + Cogretulation! You become now our Silver Partner. + info@tinyerp.com + + Hello,We are happy to announce that you now become our Silver Partner. + Regards,OpenERP Team, + + + + Congratulation! You become our Gold Partner. + info@tinyerp.com + + Hello, We are happy to announce that you become our Gold Partner. + Regards,OpenERP Team, + + + + + + + OpenERP Partner Channel + + active + + + + + + New Partner + + + + + + + Silver Partner + + + + + + + Gold Partner + + + + + + + + + + + + + + + + + + + + + OpenERP Partner + create_date + + draft + + + + diff --git a/addons/marketing_campaign/test/marketing_campaign.yml b/addons/marketing_campaign/test/marketing_campaign.yml new file mode 100644 index 00000000000..502f9e892ec --- /dev/null +++ b/addons/marketing_campaign/test/marketing_campaign.yml @@ -0,0 +1,60 @@ +- + I start compaign. +- + !workflow {model: marketing.campaign, action: state_running_set, ref: marketing_campaign_openerppartnerchannel} +- + I check the campaign on Running mode. +- + !assert {model: marketing.campaign, id: marketing_campaign_openerppartnerchannel}: + - state == 'running' +- + This campaign is only for OpenERP partner, so I assinged this Campaign + to right segment, after that I start this segment. +- + !workflow {model: marketing.campaign.segment, action: state_running_set, ref: marketing_campaign_segment0} +- + I check the segment on Running mode. +- + !assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}: + - state == 'running' +- + I synchronized this segment manually to see all step of activity and process covered on this campaign. +- + !python {model: marketing.campaign.segment}: | + self.synchroniz(cr, uid, [ref("marketing_campaign_segment0")]) +- + I process work item. +- + !python {model: marketing.campaign.workitem}: | + ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')), + ('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_1'))]) + #assert ids, 'Activity items not created' + #self.process(cr, uid, ids) + #record = self.browse(cr, uid, ids)[0] + #assert record.state == "done", "Activity item not in done state" +- + I print workitem report. +- + !python {model: marketing.campaign.workitem}: | + ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')), + ('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_1'))]) + #self.preview(cr, uid, ids) +- + I close segmentation After completion of all activity. +- + !workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_segment0} +- + I check the segmentation is done. +- + !assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}: + - state == 'done' +- + I close this campaing. +- + !workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_openerppartnerchannel} +- + I check the campaing is done. +- + !assert {model: marketing.campaign.segment, id: marketing_campaign_openerppartnerchannel}: + - state == 'done' + diff --git a/addons/marketing_campaign/test/marketing_campaign_demo.yml b/addons/marketing_campaign/test/marketing_campaign_demo.yml new file mode 100644 index 00000000000..c727132bd47 --- /dev/null +++ b/addons/marketing_campaign/test/marketing_campaign_demo.yml @@ -0,0 +1,5 @@ +- + In order to test process of marketing campaign, I create segment. +- + !record {model: marketing.campaign.segment, id: marketing_campaign_segment0}: + campaign_id: marketing_campaign_openerppartnerchannel diff --git a/addons/marketing_campaign_crm_demo/test/ui/workitem_report.yml b/addons/marketing_campaign/test/ui/workitem_report.yml similarity index 100% rename from addons/marketing_campaign_crm_demo/test/ui/workitem_report.yml rename to addons/marketing_campaign/test/ui/workitem_report.yml diff --git a/addons/marketing_campaign_crm_demo/__openerp__.py b/addons/marketing_campaign_crm_demo/__openerp__.py index 444758c8ccb..4841cc1a2e8 100644 --- a/addons/marketing_campaign_crm_demo/__openerp__.py +++ b/addons/marketing_campaign_crm_demo/__openerp__.py @@ -40,11 +40,6 @@ Creates demo data like leads, campaigns and segments for the module marketing_ca 'demo_xml': [ 'marketing_campaign_demo.xml', ], - 'test': [ - 'test/process/marketing_campaign.yml', - 'test/ui/demo_data.yml', - 'test/ui/workitem_report.yml' - ], 'installable': True, 'active': False, 'certificate' : '001005497972871352957', diff --git a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml index 90db37f2176..7b45c959035 100644 --- a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml +++ b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml @@ -36,135 +36,103 @@ Thanks for showing interest in OpenERP info@tinyerp.com - - Hello,Thanks for generous interest you have shown in the openERP.Regards,OpenERP Team, - mako For OpenERP OnDemand Free Trial 2010 - crm.lead Propose to subscribe to the OpenERP Discovery Day on May 2010 info@tinyerp.com - - Hello,We have very good offer that might suit you. We propose you to subscribe to the OpenERP Discovery Day on May 2010. If any further information required kindly revert back. We really appreciate your co-operation on this. Regards,OpenERP Team, - mako For OpenERP Discovery Day on May 2010 - crm.lead - + Thanks for subscribing to the OpenERP Discovery Day info@tinyerp.com - - Hello,Thanks for showing intrest and for subscribing to the OpenERP Discovery Day. If any further information required kindly revert back. I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For OpenERP Discovery Day - crm.lead - + Thanks for buying the OpenERP book info@tinyerp.com - - Hello,Thanks for showing intrest and buying the OpenERP book. If any further information required kindly revert back. I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For OpenERP book - crm.lead Propose a free technical training to Gold partners info@tinyerp.com - - Hello, We have very good offer that might suit you. For our gold partners,We are arranging free technical training on june,2010. If any further information required kindly revert back. I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For technical training to Gold partners - crm.lead Propose paid training to Silver partners info@tinyerp.com - - Hello, We have very good offer that might suit you. For our silver partners,We are paid technical training on june,2010. If any further information required kindly revert back. I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For training to Silver partners - crm.lead Propose gold partnership to silver partners info@tinyerp.com - - Hello, We have very good offer that might suit you. For our silver partners,We are offering Gold partnership. If any further information required kindly revert back. I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For gold partnership to silver partners - crm.lead Thanks for subscribing to technical training info@tinyerp.com - - Hello, Thanks for showing intrest and for subscribing to technical training.If any further information required kindly revert back.I really appreciate your co-operation on this. Regards,OpenERP Team, - mako For subscribing to technical training - crm.lead diff --git a/addons/marketing_campaign_crm_demo/test/process/marketing_campaign.yml b/addons/marketing_campaign_crm_demo/test/process/marketing_campaign.yml deleted file mode 100644 index 5d21d8c901a..00000000000 --- a/addons/marketing_campaign_crm_demo/test/process/marketing_campaign.yml +++ /dev/null @@ -1,57 +0,0 @@ -- - I created marketing campaing with specific activity(offers) to reach our partners - and communication via email according to campaing activity. - Now I start this compaign. -- - !workflow {model: marketing.campaign, action: state_running_set, ref: marketing_campaign_openerpondemandfreetrial0} -- - I check the campaign on Running mode. -- - !assert {model: marketing.campaign, id: marketing_campaign_openerpondemandfreetrial0}: - - state == 'running' -- - This campaign is only for Belgium partner of leads, so I assinged this Campaign - to right segment(Only for Belgium Leads), after that I start this segment. -- - !workflow {model: marketing.campaign.segment, action: state_running_set, ref: marketing_campaign_segment_bosslistusassociationslist0} -- - I check the segment on Running mode. -- - !assert {model: marketing.campaign.segment, id: marketing_campaign_segment_bosslistusassociationslist0}: - - state == 'running' -- - I synchronized this segment manually to see all step of activity and process covered on this campaign. -- - !python {model: marketing.campaign.segment}: | - self.synchroniz(cr, uid, [ref("marketing_campaign_segment_bosslistusassociationslist0")]) -- - I process the event of belgium partner which is particiapated with our campaing activity, - after processing the event, automatic email send to that partner with specific message and check - the status of event. -- - !python {model: marketing.campaign.workitem}: | - ids = self.search(cr, uid, [('res_id', '=', ref('crm.crm_case_ericdubois4')), ('segment_id', '=', ref('marketing_campaign_segment_bosslistusassociationslist0')), - ('campaign_id', '=', ref('marketing_campaign_openerpondemandfreetrial0')), ('activity_id', '=', ref('marketing_campaign_activity_1'))]) - assert ids, 'Activity items not created' - self.process(cr, uid, ids) - record = self.browse(cr, uid, ids)[0] - assert record.state == "done", "Activity item not in done state" -- - After completion of all activity i close segmentation first. -- - !workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_segment_bosslistusassociationslist0} -- - I check the segmentation is done. -- - !assert {model: marketing.campaign.segment, id: marketing_campaign_segment_bosslistusassociationslist0}: - - state == 'done' -- - I close this campaing. -- - !workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_openerpondemandfreetrial0} -- - I check the campaing is done. -- - !assert {model: marketing.campaign.segment, id: marketing_campaign_openerpondemandfreetrial0}: - - state == 'done' - \ No newline at end of file diff --git a/addons/marketing_campaign_crm_demo/test/ui/demo_data.yml b/addons/marketing_campaign_crm_demo/test/ui/demo_data.yml deleted file mode 100644 index 98ba4081300..00000000000 --- a/addons/marketing_campaign_crm_demo/test/ui/demo_data.yml +++ /dev/null @@ -1,5 +0,0 @@ -- - I create segment record to call onchange event. -- - !record {model: marketing.campaign.segment, id: marketing_campaign_segment_bosslistusassociationslist0}: - campaign_id: marketing_campaign_openerpondemandfreetrial0