diff options
| author | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-04-27 16:53:26 +0530 |
|---|---|---|
| committer | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-04-27 16:53:26 +0530 |
| commit | 13efdaf8a33d4b3de3129deedf883c522f63f0ee (patch) | |
| tree | 7194ddba0d81adb968a723d50a74e8da823e752d /addons | |
| parent | c94ded86597d4d4791c72dead2d437867809ed06 (diff) | |
| parent | b16e13ea56c6631f6c492326dbe025e9258b495e (diff) | |
[MERGE]:set order while merging. lp:~openerp-dev/openobject-addons/trunk-marketing_campaign-topbar-tpa
bzr revid: apa@tinyerp.com-20120427112326-32tickb5k6rtoxck
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/marketing_campaign/marketing_campaign.py | 12 | ||||
| -rw-r--r-- | addons/marketing_campaign/marketing_campaign_view.xml | 61 |
2 files changed, 41 insertions, 32 deletions
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 15753e3ad9a..ae9b531eb62 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -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) } diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml index d04cde0e428..efef0f7be72 100644 --- a/addons/marketing_campaign/marketing_campaign_view.xml +++ b/addons/marketing_campaign/marketing_campaign_view.xml @@ -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> |
