diff options
| author | Turkesh Patel (Open ERP) <tpa@tinyerp.com> | 2012-04-27 18:46:56 +0530 |
|---|---|---|
| committer | Turkesh Patel (Open ERP) <tpa@tinyerp.com> | 2012-04-27 18:46:56 +0530 |
| commit | 8a642eaee8371c0ec8d22dbfb5b4efba518b2220 (patch) | |
| tree | 3868912035984f7ac0a552fd460ce92052af5e7e | |
| parent | 3dd970b49820f7c787674a8dc60bcc61deeba393 (diff) | |
| parent | c8f02f8003145aff3c0e3fa3f6378ba65802962e (diff) | |
[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa
bzr revid: tpa@tinyerp.com-20120427131656-mcdlqzcj41rvr0mi
40 files changed, 264 insertions, 214 deletions
diff --git a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml index f2a366558ec..f275583826a 100644 --- a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml +++ b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml @@ -47,7 +47,7 @@ <field name="type">form</field> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> + <xpath expr="/form/sheet/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount, journal_id)"/> </xpath> </field> diff --git a/addons/analytic_user_function/analytic_user_function_view.xml b/addons/analytic_user_function/analytic_user_function_view.xml index 763b3115814..a3995d33808 100644 --- a/addons/analytic_user_function/analytic_user_function_view.xml +++ b/addons/analytic_user_function/analytic_user_function_view.xml @@ -50,7 +50,7 @@ <field name="priority" eval="18"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> + <xpath expr="/form/sheet/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> </xpath> </field> @@ -64,7 +64,7 @@ <field name="priority" eval="19"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace"> + <xpath expr="/form/sheet/notebook/page/field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace"> <field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> </xpath> </field> diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 467ea64e633..2c2a53bd557 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -31,9 +31,10 @@ MAX_LEVEL = 15 AVAILABLE_STATES = [ ('draft', 'New'), ('open', 'In Progress'), + ('pending', 'Pending'), ('cancel', 'Cancelled'), ('done', 'Closed'), - ('pending', 'Pending'), + ] AVAILABLE_PRIORITIES = [ diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index d915c73ac09..d85b4b2e4b5 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -53,11 +53,11 @@ <field name="arch" type="xml"> <form string="Leads Form" layout="manual"> <div class="oe_form_topbar"> + <button name="case_mark_lost" string="Close" states="open,pending" type="object" icon="gtk-close" /> <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause" /> - <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" /> - <button name="case_mark_lost" string="Close" states="open,pending" type="object" icon="gtk-close" /> <button name="case_escalate" string="Escalate" states="open,pending" type="object" icon="gtk-go-up" /> + <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" /> <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel" /> <div class="oe_right"> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/> @@ -401,8 +401,8 @@ <field name="arch" type="xml"> <form string="Opportunities" layout="manual"> <div class="oe_form_topbar"> - <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="gtk-apply" /> + <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause" /> <button name="case_escalate" string="Escalate" states="open,pending" type="object" icon="gtk-go-up" /> <button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" /> diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index e869c2a890a..c641aced9e8 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -51,9 +51,9 @@ class crm_phonecall(crm_base, osv.osv): 'state': fields.selection([ ('draft', 'Draft'), ('open', 'Todo'), + ('pending', 'Not Held'), ('cancel', 'Cancelled'), ('done', 'Held'), - ('pending', 'Not Held'), ], 'State', size=16, readonly=True, help='The state is set to \'Todo\', when a case is created.\ \nIf the case is in progress the state is set to \'Open\'.\ diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 9e4280f1e64..ef334522821 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -60,9 +60,9 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> + <button name="case_close" string="Held" states="open,pending" type="object" icon="gtk-jump-to" /> <button name="case_open" string="Todo" states="pending" type="object" icon="gtk-go-forward" /> <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause" /> - <button name="case_close" string="Held" states="open,pending" type="object" icon="gtk-jump-to" /> <button name="case_reset" string="Reset to Todo" states="cancel" type="object" icon="gtk-convert" /> <button name="case_cancel" string="Cancel" states="open,pending" type="object" icon="gtk-cancel" /> <div class="oe_right"> diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 60d5379787f..d8a95a6315a 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -68,8 +68,8 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> - <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_close" string="Done" states="open,pending" type="object" icon="gtk-jump-to" /> + <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause" /> <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" /> <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel" /> diff --git a/addons/crm_fundraising/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml index 1bef2520f91..f82485b0244 100644 --- a/addons/crm_fundraising/crm_fundraising_view.xml +++ b/addons/crm_fundraising/crm_fundraising_view.xml @@ -79,8 +79,8 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> + <button name="case_close" string="Done" states="open,pending" type="object" icon="gtk-close" /> <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> - <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close" /> <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause" /> <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" groups="base.group_extended" icon="gtk-go-up" /> <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" /> diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index aa0500ad0ff..6a04fdb4f93 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -30,9 +30,9 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> + <button name="case_close" states="open,pending" string="Close" type="object" icon="gtk-jump-to" /> <button name="case_open" states="draft,pending" string="Open" type="object" icon="gtk-go-forward" /> <button name="case_pending" states="draft,open" string="Pending" type="object" icon="gtk-media-pause" /> - <button name="case_close" states="open,draft,pending" string="Close" type="object" icon="gtk-jump-to" /> <button name="case_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" /> <button name="case_escalate" states="open,draft,pending" string="Escalate" type="object" icon="gtk-go-up" /> <button name="case_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" /> diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index f39e8a59f39..8ec3c144eee 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -247,7 +247,7 @@ <field name="model">stock.picking</field> <field name="inherit_id" ref="stock.view_picking_in_form"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after"> + <xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after"> <field name="weight"/> <field name="weight_net"/> </xpath> @@ -260,7 +260,7 @@ <field name="model">stock.picking</field> <field name="inherit_id" ref="stock.view_picking_form"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after"> + <xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after"> <field name="weight"/> <field name="weight_net"/> </xpath> diff --git a/addons/hr/hr.py b/addons/hr/hr.py index bd0c730d92d..030cafcbb45 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -110,7 +110,7 @@ class hr_job(osv.osv): 'requirements': fields.text('Requirements'), 'department_id': fields.many2one('hr.department', 'Department'), 'company_id': fields.many2one('res.company', 'Company'), - 'state': fields.selection([('open', 'In Position'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', readonly=True, required=True), + 'state': fields.selection([('open', 'In Position'),('recruit', 'In Recruitement'),('old', 'Old')], 'State', readonly=True, required=True), } _defaults = { 'expected_employees': 1, diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index 6e1983d7a11..c409ad19496 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -163,8 +163,8 @@ class hr_evaluation(osv.osv): ('draft','New'), ('wait','Plan In Progress'), ('progress','Waiting Appreciation'), - ('done','Done'), ('cancel','Cancelled'), + ('done','Done'), ], 'State', required=True, readonly=True), 'date_close': fields.date('Ending Date', select=True), 'progress': fields.float("Progress"), diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index 2c192513ed4..5b4d04923de 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -162,7 +162,7 @@ <button name="button_draft" string="Reset to Draft" states="cancel" type="object" icon="terp-stock_effects-object-colorize"/> <button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object" icon="gtk-cancel"/> <div class="oe_right"> - <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,progress,wait,done" statusbar_colors='{"progress":"blue"}'/> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,wait,done" statusbar_colors='{"progress":"blue"}'/> </div> </div> <sheet string="Appraisal" layout="auto"> diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 6e7db83bbb7..71b8b2f0bef 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -80,10 +80,11 @@ class hr_expense_expense(osv.osv): 'state': fields.selection([ ('draft', 'New'), ('confirm', 'Waiting Approval'), + ('cancelled', 'Refused'), ('accepted', 'Approved'), ('invoiced', 'Invoiced'), - ('paid', 'Reimbursed'), - ('cancelled', 'Refused')], + ('paid', 'Reimbursed') + ], 'State', readonly=True, help='When the expense request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Confirmation\'.\ \nIf the admin accepts it, the state is \'Accepted\'.\n If an invoice is made for the expense request, the state is \'Invoiced\'.\n If the expense is paid to user, the state is \'Reimbursed\'.'), } diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index a8500bc7c35..2080fadee0c 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -73,7 +73,7 @@ <button name="invoice" states="accepted" string="Invoice" type="object" icon="gtk-go-forward" groups="base.group_hr_user"/> <button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user" /> <div class="oe_right"> - <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm,accepted,invoiced" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm,accepted" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/> </div> </div> <sheet string="Expenses Sheet" layout="auto"> @@ -92,7 +92,7 @@ <field colspan="4" name="line_ids" nolabel="1" context="{'currency_id': currency_id}"> <form string="Expense Lines"> <group col="6" colspan="4"> - <field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)"/> + <field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" context="{'default_hr_expense_ok':1}"/> <field name="name" colspan="4"/> <newline/> <field name="unit_amount"/> diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 027bc12c67a..7331a6bded9 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -351,7 +351,7 @@ class hr_holidays(osv.osv): if record.employee_id and not record.holiday_status_id.limit: leaves_rest = holi_status_obj.get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves'] if leaves_rest < record.number_of_days_temp: - raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for employee %s: too few remaining days (%s).') % (record.employee_id.name, leaves_rest)) + raise osv.except_osv(_('Warning!'), _('There are not enough %s allocated for employee %s; please create an allocation request for this leave type.') % (record.holiday_status_id.name, record.employee_id.name)) return True # ----------------------------- diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index a40743e5270..4ee41bc161f 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -77,25 +77,25 @@ <sheet string="Leave Request" layout="auto"> <group col="8" colspan="4"> <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/> - <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_manager"/> + <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/> <group attrs="{'invisible':[('holiday_type','=','employee')]}"> <field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/> </group> <group attrs="{'invisible':[('holiday_type','=','category')]}"> - <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/> + <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}" groups="base.group_hr_user"/> </group> </group> <notebook colspan="4"> <page string="General"> <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/> - <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}"/> + <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/> <field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/> <field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/> <field name="number_of_days_temp"/> <field name="double_validation" invisible="1"/> <newline/> - <field name="manager_id"/> - <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/> + <field name="manager_id" groups="base.group_no_one"/> + <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/> <separator string="Reasons" colspan="4"/> <field name="notes" nolabel="1" colspan="4"/> </page> @@ -164,8 +164,8 @@ <field name="arch" type="xml"> <tree fonts="bold:needaction_pending==True" colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Allocation Requests"> <field name="needaction_pending" invisible="1"/> - <field name="holiday_type"/> <field name="employee_id"/> + <field name="holiday_type"/> <field name="category_id"/> <field name="department_id" invisible="1"/> <field name="holiday_status_id"/> @@ -247,21 +247,21 @@ <field name="arch" type="xml"> <tree fonts="bold:needaction_pending==True" colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Leave Requests"> <field name="needaction_pending" invisible="1"/> - <field name="holiday_type"/> <field name="employee_id"/> - <field name="category_id"/> - <field name="department_id" invisible="not context.get('set_visible',False)"/> - <field name="holiday_status_id"/> + <field name="holiday_type" string="Mode" groups="base.group_hr_user"/> <field name="name"/> - <field name="number_of_days" string="Number of Days" sum="Remaining Days"/> <field name="date_from"/> <field name="date_to"/> + <field name="number_of_days" string="Number of Days" sum="Remaining Days"/> + <field name="state"/> + <field name="category_id" invisible="1"/> + <field name="department_id" invisible="not context.get('set_visible',False)"/> + <field name="holiday_status_id" invisible="1"/> <field name="manager_id" invisible="1"/> <field name="user_id" invisible="1"/> <!--field name="type"/--> - <field name="state"/> - <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager"/> - <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager"/> + <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> + <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> </tree> </field> </record> diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 17a2d11fd0e..69b25798864 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -36,9 +36,9 @@ wizard.mail_compose_message.SUPPORTED_MODELS.append('hr.applicant') AVAILABLE_STATES = [ ('draft', 'New'), ('open', 'In Progress'), + ('pending', 'Pending'), ('cancel', 'Refused'), - ('done', 'Hired'), - ('pending', 'Pending') + ('done', 'Hired') ] AVAILABLE_PRIORITIES = [ diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 1adc30daa28..a0e0c04be91 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -64,7 +64,7 @@ <field name="user_id"/> <field name="state"/> <button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/> - <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/> + <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/> </tree> </field> </record> @@ -76,11 +76,11 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> - <button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/> + <button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/> <button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/> <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/> - <button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/> <button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/> + <button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/> <div class="oe_right"> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/> </div> @@ -319,8 +319,10 @@ <a t-if="record.survey.raw_value" name="action_print_survey" type="object" string="Print Interview" icon="gtk-print" /> </div> <div class="oe_kanban_right"> + <a name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/> <a name="case_open" string="In Progress" states="draft,pending" type="object" icon="kanban-apply"/> - <a name="case_pending" string="Pending" states="draft,open" type="object" icon="kanban-pause"/> + <a name="case_pending" string="Pending" states="open" type="object" icon="kanban-pause"/> + <a name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/> </div> <br class="oe_kanban_clear"/> </div> diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index d822f10d944..21cfb8482b5 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -60,8 +60,18 @@ <field name="model">hr_timesheet_sheet.sheet</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Timesheet"> - <group colspan="4" col="6"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/> + <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/> + <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/> + <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="new,confirm,done"/> + </div> + </div> + <sheet string="Timesheet" layout="auto"> + <group colspan="4" col="6" class="oe_form_header"> <field name="employee_id" on_change="onchange_employee_id(employee_id)"/> <field name="user_id" invisible="1"/> <field name="date_from"/> @@ -142,13 +152,7 @@ </group> </page> </notebook> - <group col="6" colspan="4"> - <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/> - <button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/> - <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/> - <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/> - <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/> - </group> + </sheet> </form> </field> </record> diff --git a/addons/idea/idea.py b/addons/idea/idea.py index 57b7c84351c..60fb6d0b502 100644 --- a/addons/idea/idea.py +++ b/addons/idea/idea.py @@ -187,8 +187,8 @@ class idea_idea(osv.osv): 'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'state': fields.selection([('draft', 'New'), ('open', 'Opened'), - ('close', 'Accepted'), - ('cancel', 'Refused')], + ('cancel', 'Refused'), + ('close', 'Accepted')], 'State', readonly=True, help='When the Idea is created the state is \'Draft\'.\n It is \ opened by the user, the state is \'Opened\'.\ diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index b5a23b80481..72b8dbfa3fc 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -182,8 +182,17 @@ <field name="model">idea.idea</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="New Idea"> - <group col="6" colspan="4"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/> + <button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/> + <button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,close"/> + </div> + </div> + <sheet string="New Idea" layout="auto"> + <group col="6" colspan="4" class="oe_form_header"> <field name="name" select="1" /> <field name="category_id" select="1"/> <field name="open_date" select="1"/> @@ -234,15 +243,9 @@ <field name="nbr"/> </tree> </field> - </page> </notebook> - <group colspan="4" col="6"> - <field name="state" widget="statusbar" statusbar_visible="draft,open,close"/> - <button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/> - <button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/> - <button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/> - </group> + </sheet> </form> </field> </record> diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index 7d9cd7255d3..d8ddf82f849 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -23,7 +23,15 @@ <field name="name">Order</field> <field name="model">lunch.order</field> <field name="arch" type="xml"> - <form string="Order"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="%(action_lunch_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/> + <button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirmed"/> + </div> + </div> + <sheet string="Order" layout="auto"> <field name="user_id" select="1"/> <field name="date" select="1"/> <field name="product" select="1" on_change="onchange_product(product)"/> @@ -31,13 +39,7 @@ <field name="descript"/> <field name="price"/> <field name="cashmove"/> - <newline/> - <separator string="" colspan="4"/> - <group colspan="4" col="4"> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed"/> - <button name="%(action_lunch_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/> - <button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/> - </group> + </sheet> </form> </field> </record> 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> diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 121567b3e56..86e8b655f95 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -632,7 +632,20 @@ <field name="model">mrp.production</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Manufacturing Orders"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/> + <button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/> + <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/> + <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/> + <button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/> + <button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel" icon="gtk-stop"/> + <button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/> + </div> + </div> + <sheet string="Manufacturing Orders" layout="auto"> <group colspan="4" col="7"> <field name="name" string="Reference"/> <field name="date_planned"/> @@ -699,17 +712,6 @@ states="done,cancel"/> </tree> </field> - <separator colspan="4"/> - <group col="9" colspan="4"> - <field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/> - <button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel" icon="gtk-stop"/> - <button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/> - <button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/> - <button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/> - <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/> - <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/> - <button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/> - </group> </page> <page string="Finished Products"> <field colspan="2" name="move_created_ids" nolabel="1" widget="one2many_list" @@ -787,7 +789,10 @@ <field name="move_prod_id"/> </page> </notebook> + </sheet> + <div class="oe_form_sheet_width"> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> + </div> </form> </field> </record> diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index ec2ef72d40d..843acd313bc 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -8,7 +8,7 @@ <field name="type">form</field> <field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='workcenter_lines']/form/field[@name='hour']" position="after"> + <xpath expr="/form/sheet/notebook/page/field[@name='workcenter_lines']/form/field[@name='hour']" position="after"> <group colspan="8" col="8"> <separator colspan="8"/> <field name="state"/> @@ -29,7 +29,7 @@ <field name="type">form</field> <field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after"> + <xpath expr="/form/sheet/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after"> <field name="state"/> <button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/> <button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/> diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 2622c2ba863..3b938c6ad4e 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -16,8 +16,18 @@ <field name="model">pos.order</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="PoS Orders"> - <group col="7" colspan="4"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft"/> + <button name="refund" string="Return Products" type="object" icon="gtk-ok" + attrs="{'invisible':[('state','=','draft')]}"/> + <button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/> + </div> + </div> + <sheet string="PoS Orders" layout="auto"> + <group col="7" colspan="4" class="oe_form_header"> <field name="name"/> <field name="date_order"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/> @@ -50,15 +60,6 @@ <button name="button_dummy" string="Update" icon="gtk-execute" states="draft" /> <button name="%(action_pos_discount)d" string="Discount" icon="gtk-remove" type="action" states="draft" /> </group> - - <separator colspan="4"/> - <group colspan="4" col="8"> - <field name="state" widget="statusbar" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/> - <button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft"/> - <button name="refund" string="Return Products" type="object" icon="gtk-ok" - attrs="{'invisible':[('state','=','draft')]}"/> - <button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/> - </group> </page> <page string="Payment"> <field name="statement_ids" colspan="4" nolabel="1"> @@ -99,6 +100,7 @@ <field colspan="4" name="note" nolabel="1"/> </page> </notebook> + </sheet> </form> </field> </record> diff --git a/addons/project/project.py b/addons/project/project.py index 0335b7cb540..9d62a66b653 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -662,7 +662,7 @@ class task(osv.osv): 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True), 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."), 'type_id': fields.many2one('project.task.type', 'Stage'), - 'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State', readonly=True, required=True, + 'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'),('done', 'Done')], 'State', readonly=True, required=True, help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\ \n If the task is over, the states is set to \'Done\'.'), 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 956b159a0bb..7cfdeffd2ec 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -20,13 +20,13 @@ <field name="arch" type="xml"> <form string="Project" layout="manual"> <div class="oe_form_topbar"> - <button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/> - <button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/> + <button name="set_done" string="Done" type="object" states="open,pending" icon="terp-dialog-close"/> <button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close" icon="gtk-ok"/> <button name="set_pending" string="Pending" type="object" states="open" icon="gtk-media-pause"/> - <button name="set_done" string="Done" type="object" states="open,pending" icon="terp-dialog-close"/> - <button name="reset_project" string="Reset as Project" type="object" states="template" icon="gtk-convert"/> + <button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/> <button string="New Project Based on Template" name="duplicate_template" type="object" states="template" icon="gtk-new" context="{'parent_id':parent_id}"/> + <button name="reset_project" string="Reset as Project" type="object" states="template" icon="gtk-convert"/> + <button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/> <div class="oe_right"> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' select="1" readonly="1"/> </div> @@ -224,13 +224,13 @@ <field name="arch" type="xml"> <form string="Project" layout="manual"> <div class="oe_form_topbar"> - <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/> - <button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/> + <button name="action_close" states="pending,open" string="Done" type="object" icon="terp-dialog-close"/> <button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-media-play"/> <button name="%(action_project_task_reevaluate)d" states="done,cancelled" string="Reactivate" type="action" icon="gtk-convert" context="{'button_reactivate':True}" /> <button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/> + <button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/> <button name="%(action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="terp-personal"/> - <button name="action_close" states="pending,open" string="Done" type="object" icon="terp-dialog-close"/> + <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/> <div class="oe_right"> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/> </div> diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 687221f371b..002be4aa055 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -148,8 +148,9 @@ class purchase_order(osv.osv): ('approved', 'Approved'), ('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), - ('done', 'Done'), - ('cancel', 'Cancelled') + ('cancel', 'Cancelled'), + ('done', 'Done') + ] _columns = { diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml index f29783c67ae..55204af6dde 100644 --- a/addons/purchase/stock_view.xml +++ b/addons/purchase/stock_view.xml @@ -7,7 +7,7 @@ <field name="type">form</field> <field name="inherit_id" ref="stock.view_move_form"/> <field name="arch" type="xml"> - <xpath expr="/form/group/field[@name='tracking_id']" position="before"> + <xpath expr="/form/sheet/group/field[@name='tracking_id']" position="before"> <field name="purchase_line_id" colspan="2" /> </xpath> </field> diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 9caaa86878c..76980dd068f 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -209,8 +209,8 @@ class sale_order(osv.osv): ('progress', 'In Progress'), ('shipping_except', 'Shipping Exception'), ('invoice_except', 'Invoice Exception'), + ('cancel', 'Cancelled'), ('done', 'Done'), - ('cancel', 'Cancelled') ], 'Order State', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True), 'date_order': fields.date('Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)]}), 'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."), diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 278f21cafc2..04da8fb2065 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -99,20 +99,20 @@ <field name="arch" type="xml"> <form layout="manual"> <div class="oe_form_topbar"> + <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/> + <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/> <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/> <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/> <button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/> <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/> - <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/> <button name="%(report_sale_order)d" string="Print Order" type="action" icon="gtk-print" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/> - <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/> <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/> <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> - <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/> <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/> <button name="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft"/> - <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/> <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual"/> + <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/> + <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/> <div class="oe_right"> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/> </div> diff --git a/addons/sale/stock_view.xml b/addons/sale/stock_view.xml index 578a6fb5802..a4198432ded 100644 --- a/addons/sale/stock_view.xml +++ b/addons/sale/stock_view.xml @@ -19,7 +19,7 @@ <field name="type">form</field> <field name="inherit_id" ref="stock.view_move_form"/> <field name="arch" type="xml"> - <xpath expr="/form/group/field[@name='tracking_id']" position="before"> + <xpath expr="/form/sheet/group/field[@name='tracking_id']" position="before"> <field name="sale_line_id" colspan="2"/> </xpath> </field> diff --git a/addons/sale_mrp/sale_mrp_view.xml b/addons/sale_mrp/sale_mrp_view.xml index d4d2c153d76..18014c01ae9 100644 --- a/addons/sale_mrp/sale_mrp_view.xml +++ b/addons/sale_mrp/sale_mrp_view.xml @@ -8,7 +8,7 @@ <field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="type">form</field> <field name="arch" type="xml"> - <xpath expr="/form/notebook/page/field[@name='move_prod_id']" position="after"> + <xpath expr="/form/sheet/notebook/page/field[@name='move_prod_id']" position="after"> <field name="sale_name"/> <field name="sale_ref"/> </xpath> diff --git a/addons/stock/stock.py b/addons/stock/stock.py index dee8e2a6c25..a17bfd10b24 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -632,8 +632,8 @@ class stock_picking(osv.osv): ('auto', 'Waiting Another Operation'), ('confirmed', 'Waiting Availability'), ('assigned', 'Ready to Process'), - ('done', 'Done'), ('cancel', 'Cancelled'), + ('done', 'Done'), ], 'State', readonly=True, select=True, help="* Draft: not confirmed yet and will not be scheduled until confirmed\n"\ "* Confirmed: still waiting for the availability of products\n"\ @@ -1630,7 +1630,7 @@ class stock_move(osv.osv): 'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History (parent moves)'), 'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}), 'note': fields.text('Notes'), - 'state': fields.selection([('draft', 'New'), ('waiting', 'Waiting Another Move'), ('confirmed', 'Waiting Availability'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, + 'state': fields.selection([('draft', 'New'), ('waiting', 'Waiting Another Move'), ('confirmed', 'Waiting Availability'), ('assigned', 'Available'),('cancel', 'Cancelled'),('done', 'Done')], 'State', readonly=True, select=True, help='When the stock move is created it is in the \'Draft\' state.\n After that, it is set to \'Not Available\' state if the scheduler did not find the products.\n When products are reserved it is set to \'Available\'.\n When the picking is done the state is \'Done\'.\ \nThe state is \'Waiting\' if the move is waiting for another one.'), 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 95d0acd853d..7f84ced4e92 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -691,7 +691,20 @@ <field name="type">form</field> <field eval="12" name="priority"/> <field name="arch" type="xml"> - <form string="Internal Picking List"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-apply"/> + <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/> + <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> + <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> + <button name="action_process" states="assigned" string="Process" groups="stock.group_stock_user" type="object" icon="gtk-go-forward"/> + <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" /> + <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" nolabel="1" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> + </div> + </div> + <sheet string="Internal Picking List" layout="auto"> <group colspan="4" col="6"> <group colspan="4" col="4"> <field name="name" readonly="1"/> @@ -795,16 +808,6 @@ </group> </form> </field> - <group col="10" colspan="4"> - <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> - <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> - <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-apply"/> - <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/> - <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> - <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> - <button name="action_process" states="assigned" string="Process" groups="stock.group_stock_user" type="object" icon="gtk-go-forward"/> - <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" /> - </group> </page> <page string="Additional info"> <field name="auto_picking"/> @@ -817,6 +820,7 @@ <field colspan="4" name="note" nolabel="1"/> </page> </notebook> + </sheet> </form> </field> </record> @@ -881,7 +885,21 @@ <field name="model">stock.picking</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Delivery Orders"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/> + <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-yes"/> + <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> + <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> + <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/> + <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl"/> + <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/> + <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" nolabel="1" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> + </div> + </div> + <sheet string="Delivery Orders" layout="auto"> <group col="6" colspan="4"> <group colspan="4" col="4"> <field name="name" readonly="1"/> @@ -984,17 +1002,6 @@ </group> </form> </field> - <group col="12" colspan="4"> - <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> - <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> - <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/> - <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-yes"/> - <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> - <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> - <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/> - <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/> - <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl"/> - </group> </page> <page string="Additional info"> <field name="auto_picking"/> @@ -1007,7 +1014,10 @@ <field colspan="4" name="note" nolabel="1"/> </page> </notebook> + </sheet> + <div class="oe_form_sheet_width"> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> + </div> </form> </field> </record> @@ -1100,7 +1110,21 @@ <field name="model">stock.picking</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Input Picking List"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/> + <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/> + <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> + <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> + <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/> + <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" /> + <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/> + <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" nolabel="1" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> + </div> + </div> + <sheet string="Input Picking List" layout="auto"> <group colspan="4" col="6"> <group colspan="4" col="4"> <field name="name" readonly="1"/> @@ -1201,17 +1225,6 @@ </group> </form> </field> - <group col="10" colspan="4"> - <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/> - <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> - <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/> - <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/> - <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> - <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> - <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/> - <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/> - <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" /> - </group> </page> <page string="Additional Info"> <field name="type"/> @@ -1221,7 +1234,10 @@ <field colspan="4" name="note" nolabel="1"/> </page> </notebook> + </sheet> + <div class="oe_form_sheet_width"> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> + </div> </form> </field> </record> @@ -1401,7 +1417,17 @@ <field name="type">form</field> <field eval="4" name="priority"/> <field name="arch" type="xml"> - <form string="Stock Moves"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/> + <button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/> + <button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/> + <button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/> + </div> + </div> + <sheet string="Stock Moves" layout="auto"> <group colspan="4" col="7"> <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/> @@ -1452,15 +1478,7 @@ states="draft,waiting,confirmed,assigned" string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/> </group> - - <separator colspan="4"/> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/> - <group col="4" colspan="2"> - <button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/> - <button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/> - <button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/> - <button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/> - </group> + </sheet> </form> </field> </record> @@ -1587,7 +1605,17 @@ <field name="type">form</field> <field eval="6" name="priority"/> <field name="arch" type="xml"> - <form string="Receive Products"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/> + <button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/> + <button name="%(action_partial_move_server)d" string="Process" type="action" states="assigned" icon="gtk-go-forward"/> + <button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/> + </div> + </div> + <sheet string="Receive Products" layout="auto"> <group colspan="4" col="7"> <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/> @@ -1638,15 +1666,7 @@ states="draft,waiting,confirmed,assigned,done" string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/> </group> - - <separator colspan="4"/> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/> - <group col="5" colspan="2"> - <button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/> - <button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/> - <button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/> - <button name="%(action_partial_move_server)d" string="Process" type="action" states="assigned" icon="gtk-go-forward"/> - </group> + </sheet> </form> </field> </record> diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 0101cef17b8..c95cc596641 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -59,7 +59,7 @@ class survey(osv.osv): help="Set to one if survey is answerable only once"), 'response_user': fields.integer('Maximum Answer per User', help="Set to one if you require only one Answer per user"), - 'state': fields.selection([('open', 'Open'), ('close', 'Closed'), ('cancel', 'Cancelled')], 'Status', readonly=True), + 'state': fields.selection([('open', 'Open'), ('cancel', 'Cancelled'),('close', 'Closed') ], 'Status', readonly=True), 'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"), 'tot_start_survey': fields.integer("Total Started Survey", readonly=1), 'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1), diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index 36a15948b5a..7ced238b9b2 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -18,7 +18,16 @@ <field name="model">survey</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Survey"> + <form layout="manual"> + <div class="oe_form_topbar"> + <button name="survey_open" string="Open" states="cancel,close" type="object" icon="gtk-go-forward"/> + <button name="survey_close" string="Close" states="open" type="object" icon="gtk-close"/> + <button name="survey_cancel" string="Cancel" states="open" type="object" icon="gtk-cancel"/> + <div class="oe_right"> + <field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,close"/> + </div> + </div> + <sheet string="Survey" layout="auto"> <field name="title" select="1"/> <group col="6" colspan="6"> <field name="responsible_id"/> @@ -180,16 +189,6 @@ </field> </form> </field> - <group col="9" colspan="4"> - <field name="state" widget="statusbar" statusbar_visible="open,close"/> - <button name="survey_cancel" - string="Cancel" states="open" type="object" icon="gtk-cancel"/> - <button name="survey_open" - string="Open" states="cancel,close" type="object" - icon="gtk-go-forward"/> - <button name="survey_close" - string="Close" states="open" type="object" icon="gtk-close"/> - </group> </page> <page string="Other"> <group colspan="6" col='4'> @@ -223,6 +222,7 @@ </field> </page> </notebook> + </sheet> </form> </field> </record> |
