[MERGE] merged
bzr revid: hmo@tinyerp.com-20111213074305-0x72r6vv7fuvnok0
This commit is contained in:
commit
82e232fc4e
|
@ -164,11 +164,12 @@ Normal - the campaign runs normally and automatically sends all emails and repor
|
|||
self.write(cr, uid, ids, {'state': 'cancelled'})
|
||||
return True
|
||||
|
||||
|
||||
# dead code
|
||||
def signal(self, cr, uid, model, res_id, signal, run_existing=True, context=None):
|
||||
record = self.pool.get(model).browse(cr, uid, res_id, context)
|
||||
return self._signal(cr, uid, record, signal, run_existing, context)
|
||||
|
||||
#dead code
|
||||
def _signal(self, cr, uid, record, signal, run_existing=True, context=None):
|
||||
if not signal:
|
||||
raise ValueError('signal cannot be False')
|
||||
|
@ -461,6 +462,7 @@ class marketing_campaign_activity(osv.osv):
|
|||
return super(marketing_campaign_activity, self).search(cr, uid, args,
|
||||
offset, limit, order, context, count)
|
||||
|
||||
#dead code
|
||||
def _process_wi_report(self, cr, uid, activity, workitem, context=None):
|
||||
service = netsvc.LocalService('report.%s'%activity.report_id.report_name)
|
||||
(report_data, format) = service.create(cr, uid, [], {}, {})
|
||||
|
@ -481,6 +483,7 @@ class marketing_campaign_activity(osv.osv):
|
|||
activity.email_template_id.id,
|
||||
workitem.res_id, context=context)
|
||||
|
||||
#dead code
|
||||
def _process_wi_action(self, cr, uid, activity, workitem, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<field name="email_template_id" ref="email_template_3"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- Tranisition -->
|
||||
<record id="marketing_campaign_transition_0" model="marketing.campaign.transition">
|
||||
<field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_0"/>
|
||||
|
@ -78,7 +78,7 @@
|
|||
<!-- Segment -->
|
||||
<record id="filter0" model="ir.filters">
|
||||
<field name="name">Partners</field>
|
||||
<field name="domain">[('name','like','agrolait')]</field>
|
||||
<field name="domain">[('name','like','Agrolait')]</field>
|
||||
<field name="model_id">res.partner</field>
|
||||
</record>
|
||||
<record id="marketing_campaign_segment0" model="marketing.campaign.segment">
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
-
|
||||
!assert {model: marketing.campaign, id: marketing_campaign_openerppartnerchannel}:
|
||||
- state == 'running'
|
||||
-
|
||||
I assign segment to campaign.
|
||||
-
|
||||
!record {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
|
||||
campaign_id: marketing_campaign_openerppartnerchannel
|
||||
-
|
||||
I start this segment after assinged campaign.
|
||||
-
|
||||
|
@ -25,7 +20,27 @@
|
|||
I synchronized segment manually to see all step of activity and process covered on this campaign.
|
||||
-
|
||||
!python {model: marketing.campaign.segment}: |
|
||||
segment_id = self.browse(cr ,uid ,ref("marketing_campaign_segment0") ,context)
|
||||
assert segment_id.date_next_sync, 'Next Synchronization date is not calculated.'
|
||||
self.synchroniz(cr, uid, [ref("marketing_campaign_segment0")])
|
||||
-
|
||||
I cancel Marketing Workitems.
|
||||
-
|
||||
!python {model: marketing.campaign.workitem}: |
|
||||
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
|
||||
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel'))])
|
||||
self.button_cancel(cr, uid, ids)
|
||||
record = self.browse(cr, uid, ids[0])
|
||||
assert record.state == 'cancelled' or record.state == 'done' , 'Marketing Workitem shoud be in cancel state.'
|
||||
-
|
||||
I set Marketing Workitems in draft state.
|
||||
-
|
||||
!python {model: marketing.campaign.workitem}: |
|
||||
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
|
||||
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel'))])
|
||||
self.button_draft(cr, uid, ids)
|
||||
record = self.browse(cr, uid, ids[0])
|
||||
assert record.state == 'todo' or record.state == 'done' , 'Marketing Workitem shoud be in draft state.'
|
||||
-
|
||||
I check followup detail of first activity.
|
||||
-
|
||||
|
@ -33,7 +48,9 @@
|
|||
ids = self.search(cr, uid, [('segment_id', '=', ref('marketing_campaign_segment0')),
|
||||
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_0'))])
|
||||
assert ids, 'Followup item is not created for first activity.'
|
||||
-
|
||||
work_item_id = self.browse(cr ,uid ,ids[0] ,context)
|
||||
assert work_item_id.res_name, 'Resource Name is not defined.'
|
||||
-
|
||||
I process followup of first activity.
|
||||
-
|
||||
!python {model: marketing.campaign.workitem}: |
|
||||
|
@ -54,7 +71,7 @@
|
|||
-
|
||||
!python {model: res.partner}: |
|
||||
self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':41000}, context=context)
|
||||
-
|
||||
-
|
||||
I process followup of second activity after set draft.
|
||||
-
|
||||
!python {model: marketing.campaign.workitem}: |
|
||||
|
@ -76,7 +93,7 @@
|
|||
-
|
||||
!python {model: res.partner}: |
|
||||
self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':151000}, context=context)
|
||||
-
|
||||
-
|
||||
I process followup of third activity after set draft.
|
||||
-
|
||||
!python {model: marketing.campaign.workitem}: |
|
||||
|
@ -94,7 +111,27 @@
|
|||
('campaign_id', '=', ref('marketing_campaign_openerppartnerchannel')), ('activity_id', '=', ref('marketing_campaign_activity_2'))])
|
||||
self.preview(cr, uid, ids)
|
||||
-
|
||||
I close segmentation After completion of all activity.
|
||||
I cancel segmentation because of some activity.
|
||||
-
|
||||
!workflow {model: marketing.campaign.segment, action: state_cancel_set, ref: marketing_campaign_segment0}
|
||||
-
|
||||
I check the segmentation is canceled.
|
||||
-
|
||||
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
|
||||
- state == 'cancelled'
|
||||
-
|
||||
I reopen the segmentation.
|
||||
-
|
||||
!workflow {model: marketing.campaign.segment, action: state_draft_set, ref: marketing_campaign_segment0}
|
||||
-
|
||||
!workflow {model: marketing.campaign.segment, action: state_running_set, ref: marketing_campaign_segment0}
|
||||
-
|
||||
I check the segment on Running mode after started.
|
||||
-
|
||||
!assert {model: marketing.campaign.segment, id: marketing_campaign_segment0}:
|
||||
- state == 'running'
|
||||
-
|
||||
I close segmentation After completion of all activity.
|
||||
-
|
||||
!workflow {model: marketing.campaign.segment, action: state_done_set, ref: marketing_campaign_segment0}
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue