[MERGE]:set order while merging. lp:~openerp-dev/openobject-addons/trunk-marketing_campaign-topbar-tpa

bzr revid: apa@tinyerp.com-20120427112326-32tickb5k6rtoxck
This commit is contained in:
Amit Patel (OpenERP) 2012-04-27 16:53:26 +05:30
commit 13efdaf8a3
2 changed files with 41 additions and 32 deletions

View File

@ -115,8 +115,8 @@ With Manual Confirmation - the campaigns runs normally, but the user has to vali
Normal - the campaign runs normally and automatically sends all emails and reports (be very careful with this mode, you're live!)"""),
'state': fields.selection([('draft', 'New'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled'),],
('cancelled', 'Cancelled'),
('done', 'Done')],
'State',),
'activity_ids': fields.one2many('marketing.campaign.activity',
'campaign_id', 'Activities'),
@ -270,8 +270,8 @@ class marketing_campaign_segment(osv.osv):
'the same value for the unique field as other records that already entered the campaign.'),
'state': fields.selection([('draft', 'New'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled')],
('cancelled', 'Cancelled'),
('done', 'Done')],
'State',),
'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."),
'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."),
@ -649,8 +649,8 @@ class marketing_campaign_workitem(osv.osv):
'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, readonly=True),
'state': fields.selection([('todo', 'To Do'),
('exception', 'Exception'), ('done', 'Done'),
('cancelled', 'Cancelled')], 'State', readonly=True),
('exception', 'Exception'), ('cancelled', 'Cancelled'),('done', 'Done'),
], 'State', readonly=True),
'error_msg' : fields.text('Error Message', readonly=True)
}

View File

@ -15,7 +15,17 @@
<field name="model">marketing.campaign</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Campaign">
<form layout="manual">
<div class="oe_form_topbar">
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_done_set" string="Done" states="running" icon="terp-dialog-close"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled" icon="gtk-convert"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<div class="oe_right">
<field name="state" readonly="1" widget="statusbar" nolabel="1" statusbar_visible="draft,running,done"/>
</div>
</div>
<sheet string="Campaign" layout="auto">
<group colspan="4" col="6">
<group colspan="2" col="2">
<separator string="Campaign" colspan="2" />
@ -34,14 +44,7 @@
</group>
</group>
<field name="activity_ids" nolabel = "1" colspan="4" context="{'default_object_id': object_id, 'default_campaign_id': active_id}" />
<separator string="" colspan="4" />
<group col="10" colspan="4">
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled" icon="gtk-convert"/>
<button name="state_done_set" string="Done" states="running" icon="terp-dialog-close"/>
</group>
</sheet>
</form>
</field>
</record>
@ -135,7 +138,17 @@
<field name="model">marketing.campaign.segment</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Segments">
<form layout="manual">
<div class="oe_form_topbar">
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_done_set" string="Close" states="running" icon="terp-dialog-close"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled" icon="gtk-convert"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<div class="oe_right">
<field name="state" readonly="1" nolabel="1" widget="statusbar" statusbar_visible="draft,running,done"/>
</div>
</div>
<sheet string="Segments" layout="auto">
<group colspan="2" col="2">
<separator string="Segment" colspan="4"/>
<field name="name"/>
@ -159,14 +172,7 @@
<field name="date_run" readonly="1"/>
<field name="date_done" readonly="1"/>
</group>
<separator string="" colspan="4"/>
<group col="6" colspan="4">
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_done_set" string="Close" states="running" icon="terp-dialog-close"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled" icon="gtk-convert"/>
</group>
</sheet>
</form>
</field>
</record>
@ -356,7 +362,16 @@
<field name="model">marketing.campaign.workitem</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Marketing Campaign Activities">
<form layout="manual">
<div class="oe_form_topbar">
<button string="Process" states="todo" name="process" type="object" icon="terp-gtk-go-back-rtl"/>
<button string="Reset" states="exception,cancelled" name="button_draft" type="object" icon="gtk-undo"/>
<button string="Cancel" states="todo,exception" name="button_cancel" type="object" icon="terp-gtk-stop"/>
<div class="oe_right">
<field name="state" readonly="True" nolabel="1" widget="statusbar" statusbar_visible="todo,done" statusbar_colors='{"exception":"red"}'/>
</div>
</div>
<sheet string="Marketing Campaign Activities" layout="auto">
<group colspan="4" col="6">
<group colspan="2" col="2">
<separator string="Campaign Step" colspan="2"/>
@ -380,13 +395,7 @@
<separator string="Error Message" colspan="4"/>
<field name="error_msg" nolabel="1" colspan="4"/>
</group>
<separator string="" colspan="4"/>
<group colspan="4" col="11">
<field name="state" readonly="True" widget="statusbar" statusbar_visible="todo,done" statusbar_colors='{"exception":"red"}'/>
<button string="Cancel" states="todo,exception" name="button_cancel" type="object" icon="terp-gtk-stop"/>
<button string="Reset" states="exception,cancelled" name="button_draft" type="object" icon="gtk-undo"/>
<button string="Process" states="todo" name="process" type="object" icon="terp-gtk-go-back-rtl"/>
</group>
</sheet>
</form>
</field>
</record>