[IMP] merged topbar status widgets

bzr revid: fp@tinyerp.com-20120522085037-oktkq3td2hg9lvzr
This commit is contained in:
Fabien Pinckaers 2012-05-22 10:50:37 +02:00
commit ee566d388c
84 changed files with 1033 additions and 802 deletions

View File

@ -201,11 +201,11 @@ class account_invoice(osv.osv):
'state': fields.selection([ 'state': fields.selection([
('draft','Draft'), ('draft','Draft'),
('cancel','Cancelled'),
('proforma','Pro-forma'), ('proforma','Pro-forma'),
('proforma2','Pro-forma'), ('proforma2','Pro-forma'),
('open','Open'), ('open','Open'),
('paid','Paid'), ('paid','Paid')
('cancel','Cancelled')
],'State', select=True, readonly=True, ],'State', select=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \ help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \ \n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \

View File

@ -144,8 +144,20 @@
<field name="type">form</field> <field name="type">form</field>
<field name="priority">2</field> <field name="priority">2</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Supplier Invoice"> <form layout="manual">
<group col="8" colspan="4"> <div class="oe_form_topbar">
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Supplier Invoice" layout="auto">
<group col="8" colspan="4" class="oe_form_header">
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/> <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="number" readonly="1"/> <field name="number" readonly="1"/>
<field name="type" invisible="1"/> <field name="type" invisible="1"/>
@ -203,15 +215,7 @@
<field name="amount_tax"/> <field name="amount_tax"/>
<field name="reconciled"/> <field name="reconciled"/>
<field name="amount_total"/> <field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/> <field name="residual"/>
<group col="6" colspan="4">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
</group>
</group> </group>
</page> </page>
<page string="Other Info"> <page string="Other Info">
@ -243,7 +247,10 @@
</field> </field>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>
@ -253,8 +260,22 @@
<field name="model">account.invoice</field> <field name="model">account.invoice</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Invoice"> <form layout="manual">
<group colspan="4" col="8"> <div class="oe_form_topbar">
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Invoice" layout="auto">
<group colspan="4" col="8" class="oe_form_header">
<field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/> <field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="number"/> <field name="number"/>
<field name="type" invisible="1"/> <field name="type" invisible="1"/>
@ -297,17 +318,7 @@
<field name="amount_tax"/> <field name="amount_tax"/>
<field name="reconciled"/> <field name="reconciled"/>
<field name="amount_total"/> <field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/> <field name="residual"/>
<group col="8" colspan="4" groups="base.group_user">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
<button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
</group>
</group> </group>
</page> </page>
<page string="Other Info"> <page string="Other Info">
@ -338,7 +349,10 @@
</field> </field>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>

View File

@ -11,8 +11,17 @@
<field name="model">account.fiscalyear</field> <field name="model">account.fiscalyear</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Fiscalyear"> <form layout="manual">
<group> <div class="oe_form_topbar">
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="terp-document-new"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="terp-document-new"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" />
</div>
<div class="oe_clear"/>
</div>
<sheet string="Fiscalyear" layout="auto">
<group class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
<field name="date_start"/> <field name="date_start"/>
@ -30,12 +39,7 @@
<field name="special"/> <field name="special"/>
</form> </form>
</field> </field>
<separator colspan="4" string="States"/> </sheet>
<group>
<field name="state" select="1" readonly="1"/>
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="terp-document-new"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="terp-document-new"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -92,7 +96,16 @@
<field name="model">account.period</field> <field name="model">account.period</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Period"> <form layout="manual">
<div class="oe_form_topbar">
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Period" layout="auto">
<group class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
<field name="date_start"/> <field name="date_start"/>
@ -100,9 +113,8 @@
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="fiscalyear_id" widget="selection"/> <field name="fiscalyear_id" widget="selection"/>
<field name="special"/> <field name="special"/>
<separator colspan="4" string="States"/> </group>
<field name="state"/> </sheet>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
</form> </form>
</field> </field>
</record> </record>
@ -592,8 +604,18 @@
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bank Statement"> <form layout="manual">
<group col="7" colspan="4"> <div class="oe_form_topbar">
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Bank Statement" layout="auto">
<group col="7" colspan="4" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="date" select="1" on_change="onchange_date(date, company_id)"/> <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/> <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
@ -637,13 +659,7 @@
<field colspan="4" name="move_line_ids" nolabel="1"/> <field colspan="4" name="move_line_ids" nolabel="1"/>
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
<field name="balance_end"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -653,8 +669,18 @@
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bank Statement"> <form layout="manual">
<group col="7" colspan="4"> <div class="oe_form_topbar">
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Bank Statement" layout="auto">
<group col="7" colspan="4" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="date" select="1" on_change="onchange_date(date, company_id)"/> <field name="date" select="1" on_change="onchange_date(date, company_id)"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" /> <field name='company_id' widget="selection" groups="base.group_multi_company" />
@ -684,12 +710,9 @@
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> <group col="8" colspan="4">
<field name="state"/>
<field name="balance_end"/> <field name="balance_end"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -1342,8 +1365,17 @@
<field name="model">account.move</field> <field name="model">account.move</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Journal Entries"> <form layout="manual">
<group colspan="4" col="6"> <div class="oe_form_topbar">
<button name="button_validate" states="draft" string="Post" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" />
</div>
<div class="oe_clear"/>
</div>
<sheet string="Journal Entries" layout="auto">
<group colspan="4" col="6" class="oe_form_header">
<field name="name" readonly="True"/> <field name="name" readonly="True"/>
<field name="ref"/> <field name="ref"/>
<field name="to_check"/> <field name="to_check"/>
@ -1452,13 +1484,9 @@
</field> </field>
<separator colspan="4" string="Internal Note"/> <separator colspan="4" string="Internal Note"/>
<field name="narration" colspan="4" nolabel="1" height="50"/> <field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="4" colspan="4">
<field name="state" select="1"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_validate" states="draft" string="Post" type="object" icon="terp-camera_test"/>
</group>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -2611,8 +2639,18 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Statement"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Statement" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" /> <field name='company_id' widget="selection" groups="base.group_multi_company" />
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/> <field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
@ -2701,12 +2739,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="balance_end_cash"/> <field name="balance_end_cash"/>
</group> </group>
</group> </group>
<group col="8" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object"/>
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -80,7 +80,8 @@
<field name="model">account.analytic.account</field> <field name="model">account.analytic.account</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Analytic account"> <form layout="manual">
<sheet string="Analytic account" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<field name="name" colspan="4"/> <field name="name" colspan="4"/>
<field name="code"/> <field name="code"/>
@ -106,6 +107,7 @@
<field colspan="4" name="description" nolabel="1"/> <field colspan="4" name="description" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -303,10 +303,10 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='analytic_account_id']" position="replace"> <xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/tree/field[@name='analytic_account_id']" position="replace">
<field name="analytics_id" groups="analytic.group_analytic_accounting"/> <field name="analytics_id" groups="analytic.group_analytic_accounting"/>
</xpath> </xpath>
<xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='analytic_account_id']" position="replace"> <xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/form/field[@name='analytic_account_id']" position="replace">
<field name="analytics_id" groups="analytic.group_analytic_accounting"/> <field name="analytics_id" groups="analytic.group_analytic_accounting"/>
</xpath> </xpath>
</field> </field>

View File

@ -78,8 +78,18 @@
<field name="model">account.asset.asset</field> <field name="model">account.asset.asset</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Asset"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="validate" states="draft" string="Confirm Asset" type="object" icon="terp-camera_test"/>
<button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-close"/>
<button name="set_to_draft" states="open" string="Set to Draft" type="object" icon="gtk-convert"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Asset" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="category_id" on_change="onchange_category_id(category_id)"/> <field name="category_id" on_change="onchange_category_id(category_id)"/>
<field name="code"/> <field name="code"/>
@ -111,14 +121,6 @@
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/> <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/> <field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group> </group>
<newline/>
<separator string="" colspan="4"/>
<field name="state" readonly="1" colspan="2"/>
<group colspan="2" col="4">
<button name="validate" states="draft" string="Confirm Asset" type="object" icon="terp-camera_test"/>
<button name="set_to_draft" states="open" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-close"/>
</group>
</page> </page>
<page string="Depreciation Board"> <page string="Depreciation Board">
<field name="depreciation_line_ids" colspan="4" nolabel="1" mode="tree,graph"> <field name="depreciation_line_ids" colspan="4" nolabel="1" mode="tree,graph">
@ -148,6 +150,7 @@
<field name="note" nolabel="1"/> <field name="note" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -42,17 +42,17 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="after">
<field name="val_date"/> <field name="val_date"/>
</xpath> </xpath>
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="globalisation_id" string="Glob. Id"/> <field name="globalisation_id" string="Glob. Id"/>
<field name="state" invisible="1"/> <field name="state" invisible="1"/>
</xpath> </xpath>
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='date']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='date']" position="after">
<field name="val_date"/> <field name="val_date"/>
</xpath> </xpath>
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='amount']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='amount']" position="after">
<field name="globalisation_id"/> <field name="globalisation_id"/>
<field name="state" invisible="1"/> <field name="state" invisible="1"/>
</xpath> </xpath>

View File

@ -62,7 +62,7 @@ class crossovered_budget(osv.osv):
'validating_user_id': fields.many2one('res.users', 'Validate User', readonly=True), 'validating_user_id': fields.many2one('res.users', 'Validate User', readonly=True),
'date_from': fields.date('Start Date', required=True, states={'done':[('readonly',True)]}), 'date_from': fields.date('Start Date', required=True, states={'done':[('readonly',True)]}),
'date_to': fields.date('End Date', required=True, states={'done':[('readonly',True)]}), 'date_to': fields.date('End Date', required=True, states={'done':[('readonly',True)]}),
'state' : fields.selection([('draft','Draft'),('confirm','Confirmed'),('validate','Validated'),('done','Done'),('cancel', 'Cancelled')], 'Status', select=True, required=True, readonly=True), 'state' : fields.selection([('draft','Draft'),('cancel', 'Cancelled'),('confirm','Confirmed'),('validate','Validated'),('done','Done')], 'Status', select=True, required=True, readonly=True),
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'crossovered_budget_id', 'Budget Lines', states={'done':[('readonly',True)]}), 'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'crossovered_budget_id', 'Budget Lines', states={'done':[('readonly',True)]}),
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),
} }

View File

@ -104,7 +104,20 @@
<field name="model">crossovered.budget</field> <field name="model">crossovered.budget</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Budget"> <form layout="manual">
<div class="oe_form_topbar">
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-apply" />
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-ok"/>
<button string="Done" name="done" states="validate" type="workflow" icon="gtk-jump-to" />
<button name="draft" states="cancel" string="Reset to Draft" type="workflow" icon="terp-stock_effects-object-colorize"/>
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Budget" layout="auto">
<group class="oe_form_header">
<field name="name" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/> <field name="name" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="code" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/> <field name="code" colspan="1" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/> <field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
@ -134,15 +147,8 @@
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
</form> </form>
</field> </field>
<field name="state" select="1"/>
<group col="4" colspan="2">
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow" icon="gtk-cancel"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-apply" />
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-ok"/>
<button string="Done" name="done" states="validate" type="workflow" icon="gtk-jump-to" />
<button name="draft" states="cancel" string="Reset to Draft" type="workflow" icon="terp-stock_effects-object-colorize"/>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -19,7 +19,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/> <field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace"> <xpath expr="//button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/> <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
</xpath> </xpath>
</field> </field>
@ -31,7 +31,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/> <field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace"> <xpath expr="//button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/> <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
</xpath> </xpath>
</field> </field>

View File

@ -47,7 +47,7 @@
<field name="inherit_id" ref="account.invoice_form"/> <field name="inherit_id" ref="account.invoice_form"/>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='invoice_line']" position="replace"> <xpath expr="//field[@name='invoice_line']" position="replace">
<!-- keep the original fields, because other views position on that, too --> <!-- keep the original fields, because other views position on that, too -->
<field name="invoice_line" invisible="True"/> <field name="invoice_line" invisible="True"/>
<field name="abstract_line_ids" colspan="4" nolabel="1"/> <field name="abstract_line_ids" colspan="4" nolabel="1"/>

View File

@ -92,8 +92,8 @@ class payment_order(osv.osv):
'mode': fields.many2one('payment.mode', 'Payment mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'), 'mode': fields.many2one('payment.mode', 'Payment mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([ 'state': fields.selection([
('draft', 'Draft'), ('draft', 'Draft'),
('open', 'Confirmed'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('open', 'Confirmed'),
('done', 'Done')], 'State', select=True, ('done', 'Done')], 'State', select=True,
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'), help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}), 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),

View File

@ -100,8 +100,19 @@
<field name="model">payment.order</field> <field name="model">payment.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Payment order"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/>
<button name="set_done" states="open" string="Make Payments" type="object" icon="gtk-execute"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
<button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Payment order" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="reference"/> <field name="reference"/>
<field name="mode" widget='selection'/> <field name="mode" widget='selection'/>
<field name="user_id"/> <field name="user_id"/>
@ -162,13 +173,7 @@
</field> </field>
<field name="date_created"/> <field name="date_created"/>
<field name="date_done"/> <field name="date_done"/>
<field name="state" readonly="1" select="1"/> </sheet>
<group col="4" colspan="2">
<button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
<button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/>
<button name="set_done" states="open" string="Make Payments" type="object" icon="gtk-execute"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -275,9 +275,9 @@ class account_voucher(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state':fields.selection( 'state':fields.selection(
[('draft','Draft'), [('draft','Draft'),
('cancel','Cancelled'),
('proforma','Pro-forma'), ('proforma','Pro-forma'),
('posted','Posted'), ('posted','Posted')
('cancel','Cancelled')
], 'State', readonly=True, size=32, ], 'State', readonly=True, size=32,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \ help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \ \n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \

View File

@ -40,8 +40,19 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Accounting Voucher"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Accounting Voucher" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/> <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/> <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
<field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/> <field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
@ -101,13 +112,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -218,7 +223,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/> <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
</xpath> </xpath>
</field> </field>
@ -230,7 +235,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='sequence']" position="before"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='sequence']" position="before">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/> <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
</xpath> </xpath>
</field> </field>
@ -241,7 +246,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form2"/> <field name="inherit_id" ref="account.view_bank_statement_form2"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after"> <xpath expr="//page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/> <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
</xpath> </xpath>
</field> </field>
@ -253,7 +258,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form2"/> <field name="inherit_id" ref="account.view_bank_statement_form2"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='amount']" position="after"> <xpath expr="//page/field[@name='line_ids']/form/field[@name='amount']" position="after">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/> <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
</xpath> </xpath>
</field> </field>

View File

@ -143,8 +143,19 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bill Payment"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Bill Payment" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/> <field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/> <field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id" <field name="journal_id"
@ -249,13 +260,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -292,8 +297,19 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Customer Payment"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Customer Payment" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/> <field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="amount" <field name="amount"
@ -401,13 +417,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -80,8 +80,20 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Sales Receipt"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Sales Receipt" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/> <field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/> <field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/> <field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
@ -148,16 +160,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
</group>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -206,8 +209,21 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Supplier Voucher"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Supplier Voucher" layout="auto">
<field name="pay_now" invisible="1"/>
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" /> <field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" />
<field name="date" string="Bill Date" select="1" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/> <field name="date" string="Bill Date" select="1" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/> <field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
@ -268,17 +284,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
</group>
<field name="pay_now" invisible="1"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -171,7 +171,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'), 'date_start': fields.date('Date Start'),
'date': fields.date('Date End', select=True), 'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts. 'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('template', 'Template'),('draft','New'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed')], 'State', required=True, 'state': fields.selection([('template', 'Template'),('draft','New'),('open','Open'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\ help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\ \n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \ \n* If any pending balance is there it can be in \'Pending\'. \

View File

@ -47,7 +47,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml"> <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', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount, journal_id)"/> <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount, journal_id)"/>
</xpath> </xpath>
</field> </field>

View File

@ -34,7 +34,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="account.view_account_analytic_account_form"/> <field name="inherit_id" ref="account.view_account_analytic_account_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page" position="after"> <xpath expr="//notebook/page" position="after">
<page string="Users/Products Rel."> <page string="Users/Products Rel.">
<field name="user_product_ids" colspan="4" nolabel="1"/> <field name="user_product_ids" colspan="4" nolabel="1"/>
</page> </page>
@ -50,7 +50,7 @@
<field name="priority" eval="18"/> <field name="priority" eval="18"/>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace"> <xpath expr="//field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace">
<field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/>
</xpath> </xpath>
</field> </field>
@ -64,7 +64,7 @@
<field name="priority" eval="19"/> <field name="priority" eval="19"/>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace"> <xpath expr="//field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace">
<field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/> <field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)"/>
</xpath> </xpath>
</field> </field>

View File

@ -333,10 +333,10 @@ class calendar_attendee(osv.osv):
('opt-participant', 'Optional Participation'), \ ('opt-participant', 'Optional Participation'), \
('non-participant', 'For information Purpose')], 'Role', \ ('non-participant', 'For information Purpose')], 'Role', \
help='Participation role for the calendar user'), help='Participation role for the calendar user'),
'state': fields.selection([('tentative', 'Tentative'), 'state': fields.selection([('needs-action', 'Needs Action'),
('needs-action', 'Needs Action'), ('tentative', 'Tentative'),
('accepted', 'Accepted'),
('declined', 'Declined'), ('declined', 'Declined'),
('accepted', 'Accepted'),
('delegated', 'Delegated')], 'State', readonly=True, \ ('delegated', 'Delegated')], 'State', readonly=True, \
help="Status of the attendee's participation"), help="Status of the attendee's participation"),
'rsvp': fields.boolean('Required Reply?', 'rsvp': fields.boolean('Required Reply?',
@ -1036,8 +1036,9 @@ class calendar_event(osv.osv):
'Show as', states={'done': [('readonly', True)]}), 'Show as', states={'done': [('readonly', True)]}),
'base_calendar_url': fields.char('Caldav URL', size=264), 'base_calendar_url': fields.char('Caldav URL', size=264),
'state': fields.selection([('tentative', 'Tentative'), 'state': fields.selection([('tentative', 'Tentative'),
('cancelled', 'Cancelled'),
('confirmed', 'Confirmed'), ('confirmed', 'Confirmed'),
('cancelled', 'Cancelled')], 'State', readonly=True), ], 'State', readonly=True),
'exdate': fields.text('Exception Date/Times', help="This property \ 'exdate': fields.text('Exception Date/Times', help="This property \
defines the list of date/time exceptions for a recurring calendar component."), defines the list of date/time exceptions for a recurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="Defines a \ 'exrule': fields.char('Exception Rule', size=352, help="Defines a \

View File

@ -8,59 +8,64 @@
<field name="model">calendar.attendee</field> <field name="model">calendar.attendee</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Invitation details"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<field name="email" string="Invitation To"/> <button name="do_tentative"
<field name="cutype" string="Invitation Type" /> states="needs-action,declined,accepted"
<field name="rsvp" /> string="Uncertain" type="object"
<field name="role" string="Role" /> icon="terp-crm" />
<field name="sent_by_uid" string="Invitation From" /> <button name="do_accept" string="Accept"
</group> states="needs-action,tentative,declined"
<notebook colspan="4"> type="object" icon="gtk-apply" />
<page string="Invitation"> <button
<separator string="Invitation Detail" colspan="4" /> name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
<group colspan="4" col="4"> string="Delegate" type="action"
<field name="user_id" string="Invited User"/> icon="gtk-sort-descending"
<newline/> states="needs-action,tentative,declined,accepted"
<field name="partner_id" context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
string="Contact" /> <button name="do_decline" string="Decline"
</group> states="needs-action,tentative,accepted"
<separator string="Event Detail" colspan="4" /> type="object" icon="gtk-cancel" />
<group colspan="4" col="4"> <div class="oe_right">
<field name="event_date" /> <field name="state" widget="statusbar" nolabel="1" statusbar_visible="tentative,needs-action,accepted" statusbar_colors='{"proforma":"blue"}'/>
<field name="event_end_date" /> </div>
<field name="language"/> <div class="oe_clear"/>
<field name="ref" colspan="4" readonly="1"/> </div>
</group> <sheet string="Invitation details" layout="auto">
</page> <group col="6" colspan="4">
<page string="Delegation Info"> <field name="email" string="Invitation To"/>
<separator string="Delegated From" colspan="4" /> <field name="cutype" string="Invitation Type" />
<field name="parent_ids" nolabel="1" <field name="rsvp" />
colspan="4" readonly="1" /> <field name="role" string="Role" />
<separator string="Delegated To" colspan="4" /> <field name="sent_by_uid" string="Invitation From" />
<field name="child_ids" nolabel="1" </group>
colspan="4" readonly="1" /> <notebook colspan="4">
</page> <page string="Invitation">
</notebook> <separator string="Invitation Detail" colspan="4" />
<group col="6" colspan="4"> <group colspan="4" col="4">
<field name="state" /> <field name="user_id" string="Invited User"/>
<button name="do_tentative" <newline/>
states="needs-action,declined,accepted" <field name="partner_id"
string="Uncertain" type="object" string="Contact" />
icon="terp-crm" /> </group>
<button name="do_accept" string="Accept" <separator string="Event Detail" colspan="4" />
states="needs-action,tentative,declined" <group colspan="4" col="4">
type="object" icon="gtk-apply" /> <field name="event_date" />
<button name="do_decline" string="Decline" <field name="event_end_date" />
states="needs-action,tentative,accepted" <field name="language"/>
type="object" icon="gtk-cancel" /> <field name="ref" colspan="4" readonly="1"/>
<button </group>
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" </page>
string="Delegate" type="action" <page string="Delegation Info">
icon="gtk-sort-descending" <separator string="Delegated From" colspan="4" />
states="needs-action,tentative,declined,accepted" <field name="parent_ids" nolabel="1"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" /> colspan="4" readonly="1" />
</group> <separator string="Delegated To" colspan="4" />
<field name="child_ids" nolabel="1"
colspan="4" readonly="1" />
</page>
</notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -223,7 +228,29 @@
<field name="model">calendar.event</field> <field name="model">calendar.event</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Events"> <form layout="manual">
<div class="oe_form_topbar">
<button name="do_confirm"
string="Confirm"
states="tentative,cancelled"
type="object"
icon="gtk-apply" />
<button name="do_tentative"
states="confirmed,cancelled"
string="Uncertain"
type="object"
icon="terp-crm" />
<button name="do_cancel"
string="Cancel"
states="tentative,confirmed"
type="object"
icon="gtk-cancel" />
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="tentative,confirmed" statusbar_colors='{"proforma":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Events" layout="auto">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name" select="1" string="Summary" <field name="name" select="1" string="Summary"
colspan="4" required="1" /> colspan="4" required="1" />
@ -254,25 +281,6 @@
</group> </group>
<separator string="Description" colspan="4" /> <separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" /> <field name="description" nolabel="1" colspan="4" />
<separator colspan="4" string="" />
<group col="5" colspan="4">
<field name="state" select="2" />
<button name="do_cancel"
string="Cancel"
states="tentative,confirmed"
type="object"
icon="gtk-cancel" />
<button name="do_tentative"
states="confirmed,cancelled"
string="Uncertain"
type="object"
icon="terp-crm" />
<button name="do_confirm"
string="Confirm"
states="tentative,cancelled"
type="object"
icon="gtk-apply" />
</group>
</page> </page>
<page string="Invitation Detail"> <page string="Invitation Detail">
<button string="Invite People" <button string="Invite People"
@ -397,6 +405,7 @@
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -30,10 +30,10 @@ from tools.translate import _
MAX_LEVEL = 15 MAX_LEVEL = 15
AVAILABLE_STATES = [ AVAILABLE_STATES = [
('draft', 'New'), ('draft', 'New'),
('open', 'In Progress'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('done', 'Closed'), ('open', 'In Progress'),
('pending', 'Pending'), ('pending', 'Pending'),
('done', 'Closed')
] ]
AVAILABLE_PRIORITIES = [ AVAILABLE_PRIORITIES = [

View File

@ -53,15 +53,16 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Leads Form" layout="manual"> <form string="Leads Form" layout="manual">
<div class="oe_form_topbar"> <div class="oe_form_topbar">
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel" />
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_mark_lost" string="Close" states="open,pending" type="object" icon="gtk-close" /> <button name="case_mark_lost" string="Close" states="open,pending" type="object" icon="gtk-close" />
<button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause" /> <button name="case_pending" string="Pending" states="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_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_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"> <div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div> </div>
<div class="oe_clear"/>
</div> </div>
<sheet layout="auto"> <sheet layout="auto">
<group colspan="4" col="7"> <group colspan="4" col="7">
@ -401,13 +402,13 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Opportunities" layout="manual"> <form string="Opportunities" layout="manual">
<div class="oe_form_topbar oe_form_topbar_hifirst"> <div class="oe_form_topbar oe_form_topbar_hifirst">
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" /> <button name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="gtk-apply" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" />
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" /> <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_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_escalate" string="Escalate" states="open,pending" type="object" icon="gtk-go-up" />
<button name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="gtk-apply" /> <button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" />
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" />
<div class="oe_right"> <div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div> </div>
@ -448,9 +449,7 @@
icon="terp-partner" type="action" icon="terp-partner" type="action"
string="Create" string="Create"
attrs="{'invisible':[('partner_id','!=',False)]}"/> attrs="{'invisible':[('partner_id','!=',False)]}"/>
<field name="phone" colspan="3"/> <field name="phone" colspan="3"/>
<field width="80%%" name="email_from" string="Email"/> <field width="80%%" name="email_from" string="Email"/>
<button string="Mail" <button string="Mail"
name="%(mail.action_email_compose_message_wizard)d" name="%(mail.action_email_compose_message_wizard)d"

View File

@ -51,9 +51,9 @@ class crm_phonecall(crm_base, osv.osv):
'state': fields.selection([ 'state': fields.selection([
('draft', 'Draft'), ('draft', 'Draft'),
('open', 'Todo'), ('open', 'Todo'),
('pending', 'Not Held'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('done', 'Held'), ('done', 'Held'),
('pending', 'Not Held'),
], 'State', size=16, readonly=True, ], 'State', size=16, readonly=True,
help='The state is set to \'Todo\', when a case is created.\ help='The state is set to \'Todo\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\ \nIf the case is in progress the state is set to \'Open\'.\

View File

@ -58,7 +58,19 @@
<field name="model">crm.phonecall</field> <field name="model">crm.phonecall</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Phone Call"> <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_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">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Phone Call" layout="auto">
<group colspan="6" col="7"> <group colspan="6" col="7">
<field name="name" required="1"/> <field name="name" required="1"/>
<field name="partner_phone"/> <field name="partner_phone"/>
@ -103,25 +115,10 @@
</group> </group>
<separator string="Description" colspan="4" /> <separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" /> <field name="description" nolabel="1" colspan="4" />
<separator colspan="4" /> </sheet>
<group col="8" colspan="4"> <div class="oe_form_sheet_width">
<field name="state" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
<button name="case_cancel" string="Cancel"
states="open,pending" type="object"
icon="gtk-cancel" />
<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" />
</group>
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>

View File

@ -66,7 +66,19 @@
<field name="model">crm.claim</field> <field name="model">crm.claim</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Claims"> <form layout="manual">
<div class="oe_form_topbar">
<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" />
<div class="oe_right">
<field name="state" select="1" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Claims" layout="auto">
<group> <group>
<field name="name" /> <field name="name" />
<field name="date"/> <field name="date"/>
@ -102,25 +114,6 @@
</group> </group>
<separator colspan="4" string="Claim/Action Description"/> <separator colspan="4" string="Claim/Action Description"/>
<field name="description" colspan="4" nolabel="1"/> <field name="description" colspan="4" nolabel="1"/>
<separator colspan="4" string=""/>
<group col="8" colspan="4">
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
<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_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
</group>
</page> </page>
<page string="Follow Up"> <page string="Follow Up">
<group colspan="2" col="2"> <group colspan="2" col="2">
@ -170,6 +163,7 @@
</page> </page>
</notebook> </notebook>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -77,8 +77,21 @@
<field name="model">crm.fundraising</field> <field name="model">crm.fundraising</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Funds Form"> <form layout="manual">
<group colspan="4" col="6"> <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_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" />
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel" />
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Funds Form" layout="auto">
<group colspan="4" col="6" class="oe_form_header">
<field name="name" select="1" string="Name"/> <field name="name" select="1" string="Name"/>
<field name="section_id" colspan="1" widget="selection"/> <field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" string="Responsible"/> <field name="user_id" string="Responsible"/>
@ -103,28 +116,6 @@
</group> </group>
<separator colspan="4" string="Notes"/> <separator colspan="4" string="Notes"/>
<field name="description" nolabel="1" colspan="4"/> <field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<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,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
</group>
</page> </page>
<page string="Communication &amp; History"> <page string="Communication &amp; History">
<group colspan="4"> <group colspan="4">
@ -170,6 +161,7 @@
</group> </group>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -28,8 +28,21 @@
<field name="model">crm.helpdesk</field> <field name="model">crm.helpdesk</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Helpdesk Support"> <form layout="manual">
<group colspan="4" col="7"> <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_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" />
<div class="oe_right">
<field name="state" select="1" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Helpdesk Support" layout="auto">
<group colspan="4" col="7" class="oe_form_header">
<field name="name" select="1" string="Query"/> <field name="name" select="1" string="Query"/>
<field name="section_id" widget="selection"/> <field name="section_id" widget="selection"/>
<field name="user_id" select="1"/> <field name="user_id" select="1"/>
@ -64,30 +77,6 @@
<separator colspan="4" string="Notes"/> <separator colspan="4" string="Notes"/>
<field name="description" colspan="4" nolabel="1" /> <field name="description" colspan="4" nolabel="1" />
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
<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_escalate"
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
<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" />
</group>
</page> </page>
<page string="Communication &amp; History"> <page string="Communication &amp; History">
<group colspan="4"> <group colspan="4">
@ -136,6 +125,7 @@
</group> </group>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -185,9 +185,9 @@ class event_event(osv.osv):
'date_end': fields.datetime('End Date', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'date_end': fields.datetime('End Date', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'state': fields.selection([ 'state': fields.selection([
('draft', 'Unconfirmed'), ('draft', 'Unconfirmed'),
('cancel', 'Cancelled'),
('confirm', 'Confirmed'), ('confirm', 'Confirmed'),
('done', 'Done'), ('done', 'Done')],
('cancel', 'Cancelled')],
'State', readonly=True, required=True, 'State', readonly=True, required=True,
help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'), help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'),
'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'), 'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'),
@ -271,8 +271,8 @@ class event_registration(osv.osv):
'user_id': fields.many2one('res.users', 'Attendee', states={'done': [('readonly', True)]}), 'user_id': fields.many2one('res.users', 'Attendee', states={'done': [('readonly', True)]}),
'company_id': fields.related('event_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.related('event_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Unconfirmed'), 'state': fields.selection([('draft', 'Unconfirmed'),
('open', 'Confirmed'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('open', 'Confirmed'),
('done', 'Attended')], 'State', ('done', 'Attended')], 'State',
size=16, readonly=True), size=16, readonly=True),
} }

View File

@ -50,8 +50,19 @@
<field name="model">event.event</field> <field name="model">event.event</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Events"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" icon="gtk-convert"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" select="1" nolabel="1" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Events" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="date_begin"/> <field name="date_begin"/>
<field name="date_end"/> <field name="date_end"/>
@ -96,13 +107,6 @@
</group> </group>
</form> </form>
</field> </field>
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,confirm,done"/>
<group col="4" colspan="2">
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" icon="gtk-convert"/>
</group>
</page> </page>
<page string="Speakers"> <page string="Speakers">
<field name="main_speaker_id" domain="[('speaker','=',True)]" context="{'default_speaker':1}"/> <field name="main_speaker_id" domain="[('speaker','=',True)]" context="{'default_speaker':1}"/>
@ -127,6 +131,7 @@
</group> </group>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -156,9 +161,9 @@
</tree> </tree>
</field> </field>
</record> </record>
<!-- Event Kanban View --> <!-- Event Kanban View -->
<record model="ir.ui.view" id="view_event_kanban"> <record model="ir.ui.view" id="view_event_kanban">
<field name="name">event.event.kanban</field> <field name="name">event.event.kanban</field>
<field name="model">event.event</field> <field name="model">event.event</field>
@ -353,7 +358,18 @@
<field name="model">event.registration</field> <field name="model">event.registration</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Registration"> <form layout="manual">
<div class="oe_form_topbar">
<button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_close" string="Attended" states="open" type="object" icon="gtk-apply"/>
<button string="Set To Unconfirmed" name="do_draft" states="cancel,done" type="object" icon="gtk-convert"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" select="1" nolabel="1" colspan="2" widget="statusbar" statusbar_visible="draft,open,done"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Registration" layout="auto">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="event_id" on_change="onchange_event(event_id, context)" domain="[('state','in',('draft','confirm'))]"/> <field name="event_id" on_change="onchange_event(event_id, context)" domain="[('state','in',('draft','confirm'))]"/>
<field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" on_change="onchange_partner_id(partner_id, context)"/> <field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" on_change="onchange_partner_id(partner_id, context)"/>
@ -376,15 +392,6 @@
<field name="event_begin_date" /> <field name="event_begin_date" />
<field name="event_end_date" /> <field name="event_end_date" />
</group> </group>
<separator string="" colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" colspan="2" widget="statusbar" statusbar_visible="draft,open,done"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
<button name="button_reg_close" string="Attended" states="open" type="object" icon="gtk-apply"/>
<button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button string="Set To Unconfirmed" name="do_draft" states="cancel,done" type="object" icon="gtk-convert"/>
</group>
</page> </page>
<page string="Emails"> <page string="Emails">
<!-- <!--
@ -406,6 +413,7 @@
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -7,7 +7,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="event.view_event_registration_form" /> <field name="inherit_id" ref="event.view_event_registration_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Emails']" position="after"> <xpath expr="//page[@string='Emails']" position="after">
<page string="Moodle"> <page string="Moodle">
<field name="moodle_user_password" readonly='1' colspan="2"/> <field name="moodle_user_password" readonly='1' colspan="2"/>
<field name="moodle_uid" readonly="1"/> <field name="moodle_uid" readonly="1"/>

View File

@ -110,7 +110,7 @@ class hr_job(osv.osv):
'requirements': fields.text('Requirements'), 'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'), 'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'), '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 = { _defaults = {
'expected_employees': 1, 'expected_employees': 1,

View File

@ -345,7 +345,17 @@
<field name="model">hr.job</field> <field name="model">hr.job</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Job"> <form layout="manual">
<div class="oe_form_topbar">
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
<button name="job_open" string="In Position" states="old,recruit" type="object" icon="terp-camera_test"/>
<button name="job_old" string="Mark as Old" states="open,recruit" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="recruit,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Job" layout="auto">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name" /> <field name="name" />
<field name="department_id" /> <field name="department_id" />
@ -367,12 +377,7 @@
<field name="employee_ids" colspan="4" nolabel="1" widget="many2many" mode="tree,form"/> <field name="employee_ids" colspan="4" nolabel="1" widget="many2many" mode="tree,form"/>
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> </sheet>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
<button name="job_open" string="In Position" states="old,recruit" type="object" icon="terp-camera_test"/>
<button name="job_old" string="Mark as Old" states="open,recruit" type="object" icon="gtk-cancel"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -161,10 +161,10 @@ class hr_evaluation(osv.osv):
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True), 'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True),
'state': fields.selection([ 'state': fields.selection([
('draft','New'), ('draft','New'),
('cancel','Cancelled'),
('wait','Plan In Progress'), ('wait','Plan In Progress'),
('progress','Waiting Appreciation'), ('progress','Waiting Appreciation'),
('done','Done'), ('done','Done'),
('cancel','Cancelled'),
], 'State', required=True, readonly=True), ], 'State', required=True, readonly=True),
'date_close': fields.date('Ending Date', select=True), 'date_close': fields.date('Ending Date', select=True),
'progress': fields.float("Progress"), 'progress': fields.float("Progress"),

View File

@ -154,7 +154,19 @@
<field name="model">hr_evaluation.evaluation</field> <field name="model">hr_evaluation.evaluation</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Appraisal"> <form layout="manual">
<div class="oe_form_topbar">
<button name="button_plan_in_progress" string="Start Appraisal" states="draft" type="object" icon="gtk-execute"/>
<button name="button_final_validation" string="Validate Appraisal" states="wait" type="object" icon="gtk-go-forward"/>
<button name="button_done" string="Done" states="progress" type="object" icon="gtk-jump-to"/>
<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,wait,done" statusbar_colors='{"progress":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Appraisal" layout="auto">
<group col="4" colspan="3"> <group col="4" colspan="3">
<separator string="Appraisal Data" colspan="4"/> <separator string="Appraisal Data" colspan="4"/>
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/> <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
@ -198,20 +210,7 @@
<field name="note_summary" colspan="4" nolabel="1"/> <field name="note_summary" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
<newline/> </sheet>
<group col="8" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,progress,wait,done" statusbar_colors='{"progress":"blue"}'/>
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
icon="gtk-cancel"/>
<button name="button_plan_in_progress" string="Start Appraisal" states="draft" type="object"
icon="gtk-execute"/>
<button name="button_done" string="Done" states="progress" type="object"
icon="gtk-jump-to"/>
<button name="button_draft" string="Reset to Draft" states="cancel" type="object"
icon="terp-stock_effects-object-colorize"/>
<button name="button_final_validation" string="Validate Appraisal" states="wait" type="object"
icon="gtk-go-forward"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -79,11 +79,12 @@ class hr_expense_expense(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([ 'state': fields.selection([
('draft', 'New'), ('draft', 'New'),
('cancelled', 'Refused'),
('confirm', 'Waiting Approval'), ('confirm', 'Waiting Approval'),
('accepted', 'Approved'), ('accepted', 'Approved'),
('invoiced', 'Invoiced'), ('invoiced', 'Invoiced'),
('paid', 'Reimbursed'), ('paid', 'Reimbursed')
('cancelled', 'Refused')], ],
'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\'.\ '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\'.'), \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\'.'),
} }

View File

@ -65,7 +65,19 @@
<field name="type">form</field> <field name="type">form</field>
<field name="model">hr.expense.expense</field> <field name="model">hr.expense.expense</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Expenses Sheet"> <form layout="manual">
<div class="oe_form_topbar">
<button name="confirm" states="draft" string="Submit to Manager" type="workflow" icon="gtk-apply"/>
<button name="validate" states="confirm" string="Approve" type="workflow" icon="gtk-go-forward" groups="base.group_hr_user"/>
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert" groups="base.group_hr_user"/>
<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" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Expenses Sheet" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/> <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
<field name="name"/> <field name="name"/>
@ -99,14 +111,6 @@
</group> </group>
</form> </form>
</field> </field>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,invoiced" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
<group col="6" colspan="2">
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert" groups="base.group_hr_user"/>
<button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user" />
<button name="confirm" states="draft" string="Submit to Manager" type="workflow" icon="gtk-apply"/>
<button name="invoice" states="accepted" string="Invoice" type="object" icon="gtk-go-forward" groups="base.group_hr_user"/>
<button name="validate" states="confirm" string="Approve" type="workflow" icon="gtk-go-forward" groups="base.group_hr_user"/>
</group>
</page> </page>
<page string="Other Info"> <page string="Other Info">
<group col="2" colspan="2"> <group col="2" colspan="2">
@ -124,6 +128,7 @@
<field colspan="4" name="note" nolabel="1"/> <field colspan="4" name="note" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -112,8 +112,8 @@ class hr_holidays(osv.osv):
_columns = { _columns = {
'name': fields.char('Description', required=True, size=64), 'name': fields.char('Description', required=True, size=64),
'state': fields.selection([('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), 'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'),('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')], ('validate1', 'Waiting Second Approval'), ('validate', 'Approved')],
'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\ 'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
\nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\ \nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\
\nThe state is \'Refused\', when holiday request is refused by manager.\ \nThe state is \'Refused\', when holiday request is refused by manager.\
@ -308,7 +308,7 @@ class hr_holidays(osv.osv):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr) wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr) wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr)
if holiday_ids: if holiday_ids:
self.holidays_valid2_notificate(self, cr, uid, [holiday_ids], context=context) self.holidays_valid2_notificate(cr, uid, holiday_ids, context=context)
self.write(cr, uid, holiday_ids, {'manager_id2': manager}) self.write(cr, uid, holiday_ids, {'manager_id2': manager})
return True return True

View File

@ -63,7 +63,19 @@
<field name="type">form</field> <field name="type">form</field>
<field name="priority">1</field> <field name="priority">1</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Leave Request"> <form layout="manual">
<div class="oe_form_topbar">
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<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"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Set to Draft" name="set_to_draft" states="refuse,validate" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Leave Request" layout="auto">
<group col="8" colspan="4"> <group col="8" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/> <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_user"/> <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
@ -87,17 +99,12 @@
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/> <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
<separator string="Reasons" colspan="4"/> <separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/> <field name="notes" nolabel="1" colspan="4"/>
<group colspan="4" col="8">
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<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"/>
<button string="Set to Draft" name="set_to_draft" states="refuse,validate" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
</group>
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>
@ -108,8 +115,20 @@
<field name="model">hr.holidays</field> <field name="model">hr.holidays</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Allocation Request"> <form layout="manual">
<group col="8" colspan="4"> <div class="oe_form_topbar">
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<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"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
<button string="Set to Draft" name="set_to_draft" states="cancel,validate,refuse" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Allocation Request" layout="auto">
<group col="8" colspan="4" class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/> <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<group attrs="{'invisible':[('holiday_type','=','category')]}"> <group attrs="{'invisible':[('holiday_type','=','category')]}">
@ -130,17 +149,12 @@
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/> <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
<separator string="Reasons" colspan="4"/> <separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/> <field name="notes" nolabel="1" colspan="4"/>
<group colspan="4" col="8">
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
<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"/>
<button string="Set to Draft" name="set_to_draft" states="cancel,validate,refuse" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
</group>
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>

View File

@ -260,8 +260,20 @@
<field name="model">hr.payslip</field> <field name="model">hr.payslip</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Payslip"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button string="Confirm" icon="terp-camera_test" name="hr_verify_sheet" states="draft"/>
<button string="Refund" icon="gtk-execute" name="refund_sheet" states="confirm,done" type='object'/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft" states="cancel"/>
<button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm,verify"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Payslip" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="employee_id" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/> <field name="employee_id" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
<field name="number"/> <field name="number"/>
<field name="date_from" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/> <field name="date_from" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
@ -362,16 +374,8 @@
<separator colspan="4" string="Notes"/> <separator colspan="4" string="Notes"/>
<field name="note" colspan="4" nolabel="1"/> <field name="note" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> </sheet>
<field name="state"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm,verify"/>
<button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft" states="cancel"/>
<button string="Refund" icon="gtk-execute" name="refund_sheet" states="confirm,done" type='object'/>
<button string="Confirm" icon="terp-camera_test" name="hr_verify_sheet" states="draft"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -720,8 +724,18 @@
<field name="model">hr.payslip.run</field> <field name="model">hr.payslip.run</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Payslips Batches"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="close_payslip_run" type="object" icon="terp-camera_test" string="Close" states="draft"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" icon="gtk-execute" string="Generate Payslips" />
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft_payslip_run" type="object" states="close"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Payslips Batches" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" colspan="4"/> <field name="name" colspan="4"/>
<field name="credit_note"/> <field name="credit_note"/>
<field name="date_start"/> <field name="date_start"/>
@ -732,12 +746,7 @@
<field name="slip_ids" colspan="4" nolabel="1"/> <field name="slip_ids" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> </sheet>
<field name="state"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" icon="gtk-execute" string="Generate Payslips" />
<button name="close_payslip_run" type="object" icon="terp-camera_test" string="Close" states="draft"/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft_payslip_run" type="object" states="close"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -35,10 +35,10 @@ wizard.mail_compose_message.SUPPORTED_MODELS.append('hr.applicant')
AVAILABLE_STATES = [ AVAILABLE_STATES = [
('draft', 'New'), ('draft', 'New'),
('open', 'In Progress'),
('cancel', 'Refused'), ('cancel', 'Refused'),
('done', 'Hired'), ('open', 'In Progress'),
('pending', 'Pending') ('pending', 'Pending'),
('done', 'Hired')
] ]
AVAILABLE_PRIORITIES = [ AVAILABLE_PRIORITIES = [

View File

@ -76,11 +76,11 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form layout="manual"> <form layout="manual">
<div class="oe_form_topbar"> <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_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="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_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"> <div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div> </div>

View File

@ -21,16 +21,20 @@
<separator colspan="4" string="Invoicing Statistics"/> <separator colspan="4" string="Invoicing Statistics"/>
<field name="amount_invoiced"/> <field name="amount_invoiced"/>
</group> </group>
<separator colspan="4"/> </group>
<group col="9" colspan="8"> <xpath expr="/form/sheet" position='before'>
<field name="state" readonly="1" widget="statusbar" <div class="oe_form_topbar">
statusbar_visible="open,pending,close" statusbar_colors='{"pending":"red", "template":"blue"}'/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close,draft" icon="gtk-ok"/>
<button name="set_pending" string="Pending" type="object" states="open" icon="gtk-media-pause"/> <button name="set_pending" string="Pending" type="object" states="open" icon="gtk-media-pause"/>
<button name="set_close" string="Close" type="object" states="open,pending" icon="terp-dialog-close"/> <button name="set_close" string="Close" type="object" states="open,pending" icon="terp-dialog-close"/>
</group> <button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close,draft" icon="gtk-ok"/>
</group> <button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" readonly="1" widget="statusbar" nolabel="1"
statusbar_visible="open,pending,close" statusbar_colors='{"pending":"red", "template":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
</xpath>
</field> </field>
</record> </record>

View File

@ -60,8 +60,19 @@
<field name="model">hr_timesheet_sheet.sheet</field> <field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Timesheet"> <form layout="manual">
<group colspan="4" col="6"> <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 class="oe_clear"/>
</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="employee_id" on_change="onchange_employee_id(employee_id)"/>
<field name="user_id" invisible="1"/> <field name="user_id" invisible="1"/>
<field name="date_from"/> <field name="date_from"/>
@ -142,13 +153,7 @@
</group> </group>
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>

View File

@ -187,8 +187,8 @@ class idea_idea(osv.osv):
'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'New'), 'state': fields.selection([('draft', 'New'),
('open', 'Opened'), ('open', 'Opened'),
('close', 'Accepted'), ('cancel', 'Refused'),
('cancel', 'Refused')], ('close', 'Accepted')],
'State', readonly=True, 'State', readonly=True,
help='When the Idea is created the state is \'Draft\'.\n It is \ help='When the Idea is created the state is \'Draft\'.\n It is \
opened by the user, the state is \'Opened\'.\ opened by the user, the state is \'Opened\'.\

View File

@ -182,8 +182,18 @@
<field name="model">idea.idea</field> <field name="model">idea.idea</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="New Idea"> <form layout="manual">
<group col="6" colspan="4"> <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 class="oe_clear"/>
</div>
<sheet string="New Idea" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1" /> <field name="name" select="1" />
<field name="category_id" select="1"/> <field name="category_id" select="1"/>
<field name="open_date" select="1"/> <field name="open_date" select="1"/>
@ -234,15 +244,9 @@
<field name="nbr"/> <field name="nbr"/>
</tree> </tree>
</field> </field>
</page> </page>
</notebook> </notebook>
<group colspan="4" col="6"> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>

View File

@ -23,7 +23,16 @@
<field name="name">Order</field> <field name="name">Order</field>
<field name="model">lunch.order</field> <field name="model">lunch.order</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Order" layout="auto">
<field name="user_id" select="1"/> <field name="user_id" select="1"/>
<field name="date" select="1"/> <field name="date" select="1"/>
<field name="product" select="1" on_change="onchange_product(product)"/> <field name="product" select="1" on_change="onchange_product(product)"/>
@ -31,13 +40,7 @@
<field name="descript"/> <field name="descript"/>
<field name="price"/> <field name="price"/>
<field name="cashmove"/> <field name="cashmove"/>
<newline/> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>

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!)"""), 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'), 'state': fields.selection([('draft', 'New'),
('running', 'Running'), ('running', 'Running'),
('done', 'Done'), ('cancelled', 'Cancelled'),
('cancelled', 'Cancelled'),], ('done', 'Done')],
'State',), 'State',),
'activity_ids': fields.one2many('marketing.campaign.activity', 'activity_ids': fields.one2many('marketing.campaign.activity',
'campaign_id', 'Activities'), 'campaign_id', 'Activities'),
@ -269,9 +269,9 @@ class marketing_campaign_segment(osv.osv):
'If the campaign has a "unique field" set, "no duplicates" will also prevent selecting records which have '\ 'If the campaign has a "unique field" set, "no duplicates" will also prevent selecting records which have '\
'the same value for the unique field as other records that already entered the campaign.'), 'the same value for the unique field as other records that already entered the campaign.'),
'state': fields.selection([('draft', 'New'), 'state': fields.selection([('draft', 'New'),
('cancelled', 'Cancelled'),
('running', 'Running'), ('running', 'Running'),
('done', 'Done'), ('done', 'Done')],
('cancelled', 'Cancelled')],
'State',), 'State',),
'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."), '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."), 'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."),
@ -648,9 +648,11 @@ class marketing_campaign_workitem(osv.osv):
'res_name': fields.function(_res_name_get, string='Resource Name', fnct_search=_resource_search, type="char", size=64), 'res_name': fields.function(_res_name_get, string='Resource Name', fnct_search=_resource_search, type="char", size=64),
'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True), '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), 'partner_id': fields.many2one('res.partner', 'Partner', select=1, readonly=True),
'state': fields.selection([('todo', 'To Do'), 'state': fields.selection([ ('todo', 'To Do'),
('exception', 'Exception'), ('done', 'Done'), ('cancelled', 'Cancelled'),
('cancelled', 'Cancelled')], 'State', readonly=True), ('exception', 'Exception'),
('done', 'Done'),
], 'State', readonly=True),
'error_msg' : fields.text('Error Message', readonly=True) 'error_msg' : fields.text('Error Message', readonly=True)
} }

View File

@ -15,7 +15,18 @@
<field name="model">marketing.campaign</field> <field name="model">marketing.campaign</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Campaign" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<group colspan="2" col="2"> <group colspan="2" col="2">
<separator string="Campaign" colspan="2" /> <separator string="Campaign" colspan="2" />
@ -34,14 +45,7 @@
</group> </group>
</group> </group>
<field name="activity_ids" nolabel = "1" colspan="4" context="{'default_object_id': object_id, 'default_campaign_id': active_id}" /> <field name="activity_ids" nolabel = "1" colspan="4" context="{'default_object_id': object_id, 'default_campaign_id': active_id}" />
<separator string="" colspan="4" /> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>
@ -135,7 +139,18 @@
<field name="model">marketing.campaign.segment</field> <field name="model">marketing.campaign.segment</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Segments" layout="auto">
<group colspan="2" col="2"> <group colspan="2" col="2">
<separator string="Segment" colspan="4"/> <separator string="Segment" colspan="4"/>
<field name="name"/> <field name="name"/>
@ -159,14 +174,7 @@
<field name="date_run" readonly="1"/> <field name="date_run" readonly="1"/>
<field name="date_done" readonly="1"/> <field name="date_done" readonly="1"/>
</group> </group>
<separator string="" colspan="4"/> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>
@ -356,7 +364,17 @@
<field name="model">marketing.campaign.workitem</field> <field name="model">marketing.campaign.workitem</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Marketing Campaign Activities" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<group colspan="2" col="2"> <group colspan="2" col="2">
<separator string="Campaign Step" colspan="2"/> <separator string="Campaign Step" colspan="2"/>
@ -380,13 +398,7 @@
<separator string="Error Message" colspan="4"/> <separator string="Error Message" colspan="4"/>
<field name="error_msg" nolabel="1" colspan="4"/> <field name="error_msg" nolabel="1" colspan="4"/>
</group> </group>
<separator string="" colspan="4"/> </sheet>
<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>
</form> </form>
</field> </field>
</record> </record>

View File

@ -481,7 +481,7 @@ class mrp_production(osv.osv):
'move_created_ids2': fields.one2many('stock.move', 'production_id', 'Produced Products', domain=[('state','in', ('done', 'cancel'))]), 'move_created_ids2': fields.one2many('stock.move', 'production_id', 'Produced Products', domain=[('state','in', ('done', 'cancel'))]),
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'), 'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'),
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation'), 'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation'),
'state': fields.selection([('draft','New'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('cancel','Cancelled'),('done','Done')],'State', readonly=True, 'state': fields.selection([('draft','New'),('cancel','Cancelled'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('done','Done')],'State', readonly=True,
help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\ help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\
\nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'), \nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'),
'hour_total': fields.function(_production_calc, type='float', string='Total Hours', multi='workorder', store=True), 'hour_total': fields.function(_production_calc, type='float', string='Total Hours', multi='workorder', store=True),

View File

@ -631,7 +631,21 @@
<field name="model">mrp.production</field> <field name="model">mrp.production</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Manufacturing Orders" layout="auto">
<group colspan="4" col="7"> <group colspan="4" col="7">
<field name="name" string="Reference"/> <field name="name" string="Reference"/>
<field name="date_planned"/> <field name="date_planned"/>
@ -698,17 +712,6 @@
states="done,cancel"/> states="done,cancel"/>
</tree> </tree>
</field> </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>
<page string="Finished Products"> <page string="Finished Products">
<field colspan="2" name="move_created_ids" nolabel="1" widget="one2many_list" <field colspan="2" name="move_created_ids" nolabel="1" widget="one2many_list"
@ -786,7 +789,10 @@
<field name="move_prod_id"/> <field name="move_prod_id"/>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>
@ -961,10 +967,10 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="/form/notebook/page/field[@name='move_id']" position="before"> <xpath expr="/form/sheet/notebook/page/field[@name='move_id']" position="before">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/> <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
</xpath> </xpath>
<xpath expr="/form/notebook/page/field[@name='close_move']" position="after"> <xpath expr="/form/sheet/notebook/page/field[@name='close_move']" position="after">
<group colspan="4" groups="product.group_mrp_properties"> <group colspan="4" groups="product.group_mrp_properties">
<separator colspan="4" string="Properties" /> <separator colspan="4" string="Properties" />
<field colspan="4" name="property_ids" nolabel="1"/> <field colspan="4" name="property_ids" nolabel="1"/>

View File

@ -86,7 +86,7 @@ class mrp_production_workcenter_line(osv.osv):
_order = "sequence, date_planned" _order = "sequence, date_planned"
_columns = { _columns = {
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pending'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True, 'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('pause','Pending'),('startworking', 'In Progress'),('done','Finished')],'State', readonly=True,
help="* When a work order is created it is set in 'Draft' state.\n" \ help="* When a work order is created it is set in 'Draft' state.\n" \
"* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \ "* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' state.\n" \ "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' state.\n" \

View File

@ -3,24 +3,24 @@
<data> <data>
<record id="mrp_production_form_inherit_view" model="ir.ui.view"> <record id="mrp_production_form_inherit_view" model="ir.ui.view">
<field name="name">mrp.production.form.inherit</field> <field name="name">mrp.production.form.inherit</field>
<field name="model">mrp.production</field> <field name="model">mrp.production</field>
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/form/field[@name='hour']" position="after"> <xpath expr="//field[@name='workcenter_lines']/form/field[@name='hour']" position="after">
<group colspan="8" col="8"> <group colspan="8" col="8">
<separator colspan="8"/> <separator colspan="8"/>
<field name="state"/> <field name="state"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/> <button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/> <button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/> <button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/> <button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
<button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/> <button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-check" help="Finish Order"/> <button name="button_done" string="Finished" states="startworking" icon="terp-check" help="Finish Order"/>
</group> </group>
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="mrp_production_form_inherit_view2" model="ir.ui.view"> <record id="mrp_production_form_inherit_view2" model="ir.ui.view">
@ -29,7 +29,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after"> <xpath expr="//field[@name='workcenter_lines']/tree/field[@name='hour']" position="after">
<field name="state"/> <field name="state"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/> <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"/> <button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
@ -71,8 +71,21 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" eval="False"/> <field name="inherit_id" eval="False"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Work Orders"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-check"/>
<button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,startworking"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Work Orders" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field colspan="4" name="name" select="1"/> <field colspan="4" name="name" select="1"/>
<field name="workcenter_id" select="1" widget="selection"/> <field name="workcenter_id" select="1" widget="selection"/>
<field name="production_id"/> <field name="production_id"/>
@ -105,19 +118,9 @@
<field name="qty"/> <field name="qty"/>
<field name="uom" widget="selection"/> <field name="uom" widget="selection"/>
</group> </group>
<separator string="" colspan="4"/>
<group colspan="8" col="8">
<field name="state"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
<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"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_pause" string="Pending" states="startworking" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-check"/>
</group>
</page> </page>
</notebook> </notebook>
</sheet>
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</form> </form>
</field> </field>
@ -130,24 +133,24 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Search Work Orders"> <search string="Search Work Orders">
<group> <group>
<filter icon="terp-document-new" string="Draft" <filter icon="terp-document-new" string="Draft"
domain="[('state','=','draft')]"/> domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="In Progress" name="Current" <filter icon="terp-check" string="In Progress" name="Current"
domain="[('state','=','startworking')]"/> domain="[('state','=','startworking')]"/>
<filter icon="terp-gtk-media-pause" string="Pending" <filter icon="terp-gtk-media-pause" string="Pending"
domain="[('state','=','pause')]"/> domain="[('state','=','pause')]"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late" <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]" domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
help="Production started late" /> help="Production started late" />
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="name"/> <field name="name"/>
<field name="workcenter_id" widget="selection"/> <field name="workcenter_id" widget="selection"/>
<field name="production_id" /> <field name="production_id" />
<field name="state" /> <field name="state" />
<field name="date_planned"/> <field name="date_planned"/>
</group> </group>
<newline/> <newline/>
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
<filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/> <filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/> <filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>

View File

@ -122,13 +122,13 @@ class mrp_repair(osv.osv):
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"), 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"),
'state': fields.selection([ 'state': fields.selection([
('draft','Quotation'), ('draft','Quotation'),
('cancel','Cancel'),
('confirmed','Confirmed'), ('confirmed','Confirmed'),
('ready','Ready to Repair'),
('under_repair','Under Repair'), ('under_repair','Under Repair'),
('ready','Ready to Repair'),
('2binvoiced','To be Invoiced'), ('2binvoiced','To be Invoiced'),
('invoice_except','Invoice Exception'), ('invoice_except','Invoice Exception'),
('done','Done'), ('done','Done')
('cancel','Cancel')
], 'State', readonly=True, ], 'State', readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \ help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \
\n* The \'Confirmed\' state is used when a user confirms the repair order. \ \n* The \'Confirmed\' state is used when a user confirms the repair order. \

View File

@ -27,8 +27,26 @@
<field name="model">mrp.repair</field> <field name="model">mrp.repair</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Repairs order"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="terp-camera_test"/>
<button name="repair_ready" states="confirmed" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_repair_start" states="ready" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_repair_end" states="under_repair" string="End Repair" icon="terp-dialog-close"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="terp-dolar"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="terp-dolar"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="terp-emblem-important"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-stop"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-stop"/>
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-stop"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirmed,ready" />
</div>
<div class="oe_clear"/>
</div>
<sheet string="Repairs order" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id)"/> <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
<field name="deliver_bool"/> <field name="deliver_bool"/>
@ -99,21 +117,6 @@
<field name="amount_total" sum="Total amount"/> <field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/> <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
</group> </group>
<separator string="" colspan="4"/>
<group col="13" colspan="4">
<field name="state"/>
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-stop"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-stop"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-stop"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="terp-camera_test"/>
<button name="repair_ready" states="confirmed" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_repair_start" states="ready" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_repair_end" states="under_repair" string="End Repair" icon="terp-dialog-close"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="terp-dolar"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="terp-emblem-important"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="terp-dolar"/>
</group>
</page> </page>
<page string="Invoicing"> <page string="Invoicing">
<field name="invoice_method" colspan="4"/> <field name="invoice_method" colspan="4"/>
@ -171,6 +174,7 @@
<field colspan="4" name="quotation_notes" nolabel="1"/> <field colspan="4" name="quotation_notes" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -16,8 +16,19 @@
<field name="model">pos.order</field> <field name="model">pos.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="PoS Orders"> <form layout="manual">
<group col="7" colspan="4"> <div class="oe_form_topbar">
<button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft"/>
<button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
<button name="refund" string="Return Products" type="object" icon="gtk-ok"
attrs="{'invisible':[('state','=','draft')]}"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="PoS Orders" layout="auto">
<group col="7" colspan="4" class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="date_order"/> <field name="date_order"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/>
@ -50,15 +61,6 @@
<button name="button_dummy" string="Update" icon="gtk-execute" states="draft" /> <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" /> <button name="%(action_pos_discount)d" string="Discount" icon="gtk-remove" type="action" states="draft" />
</group> </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>
<page string="Payment"> <page string="Payment">
<field name="statement_ids" colspan="4" nolabel="1"> <field name="statement_ids" colspan="4" nolabel="1">
@ -99,6 +101,7 @@
<field colspan="4" name="note" nolabel="1"/> <field colspan="4" name="note" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -106,10 +106,10 @@ class procurement_order(osv.osv):
'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."), 'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."),
'state': fields.selection([ 'state': fields.selection([
('draft','Draft'), ('draft','Draft'),
('cancel','Cancelled'),
('confirmed','Confirmed'), ('confirmed','Confirmed'),
('exception','Exception'), ('exception','Exception'),
('running','Running'), ('running','Running'),
('cancel','Cancel'),
('ready','Ready'), ('ready','Ready'),
('done','Done'), ('done','Done'),
('waiting','Waiting')], 'State', required=True, ('waiting','Waiting')], 'State', required=True,

View File

@ -46,8 +46,19 @@
<field name="model">procurement.order</field> <field name="model">procurement.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Procurement"> <form layout="manual">
<group col="2" colspan="2"> <div class="oe_form_topbar">
<button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
<button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
<button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" readonly="1" widget="statusbar" nolabel="1" statusbar_visible="draft,confirmed" />
</div>
<div class="oe_clear"/>
</div>
<sheet string="Procurement" layout="auto">
<group col="2" colspan="2" class="oe_form_header">
<separator colspan="2" string="References"/> <separator colspan="2" string="References"/>
<field name="name" string="Procurement Reason"/> <field name="name" string="Procurement Reason"/>
<field name="origin"/> <field name="origin"/>
@ -72,13 +83,6 @@
<separator colspan="4" string="Status"/> <separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/> <field colspan="4" name="message" readonly="1"/>
<field name="state" readonly="1"/>
<group col="7" colspan="2">
<button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
<button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
<button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
<button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
</group>
</page> </page>
<page string="Extra Information"> <page string="Extra Information">
<separator colspan="4" string="Details"/> <separator colspan="4" string="Details"/>
@ -91,6 +95,7 @@
<field name="note" colspan="4" nolabel="1"/> <field name="note" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -671,7 +671,7 @@ class task(osv.osv):
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True), '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."), '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'), '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'),('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('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.\ 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\'.'), \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', 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State',
@ -1300,7 +1300,7 @@ class project_task_history(osv.osv):
_columns = { _columns = {
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True), 'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True),
'type_id': fields.many2one('project.task.type', 'Stage'), 'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State'), 'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done')], 'State'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False), 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False),
'date': fields.date('Date', select=True), 'date': fields.date('Date', select=True),
'end_date': fields.function(_get_date, string='End Date', type="date", store={ 'end_date': fields.function(_get_date, string='End Date', type="date", store={

View File

@ -20,16 +20,17 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Project" layout="manual"> <form string="Project" layout="manual">
<div class="oe_form_topbar"> <div class="oe_form_topbar">
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/> <button name="set_done" string="Done" type="object" states="open,pending" icon="terp-dialog-close"/>
<button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close" icon="gtk-ok"/> <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_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="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" 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 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"> <div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' select="1" readonly="1"/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' select="1" readonly="1"/>
</div> </div>
<div class="oe_clear"/>
</div> </div>
<sheet string="Project" layout="auto"> <sheet string="Project" layout="auto">
<group colspan="6" col="6"> <group colspan="6" col="6">
@ -320,16 +321,17 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Project" layout="manual"> <form string="Project" layout="manual">
<div class="oe_form_topbar"> <div class="oe_form_topbar">
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/> <button name="action_close" states="pending,open" string="Done" type="object" icon="terp-dialog-close"/>
<button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/>
<button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-media-play"/> <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="%(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_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_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"> <div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
</div> </div>
<div class="oe_clear"/>
</div> </div>
<sheet string="Task edition" layout="auto"> <sheet string="Task edition" layout="auto">
<group colspan="6" col="6"> <group colspan="6" col="6">

View File

@ -173,7 +173,7 @@ class project_issue(crm.crm_case, osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', select=1), 'partner_id': fields.many2one('res.partner', 'Partner', select=1),
'company_id': fields.many2one('res.company', 'Company'), 'company_id': fields.many2one('res.company', 'Company'),
'description': fields.text('Description'), 'description': fields.text('Description'),
'state': fields.selection([('draft', 'New'), ('open', 'In Progress'), ('cancel', 'Cancelled'), ('done', 'Done'),('pending', 'Pending'), ], 'State', size=16, readonly=True, 'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'), ('open', 'In Progress'),('pending', 'Pending'),('done', 'Done') ], 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\ \nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\ \nWhen the case is over, the state is set to \'Done\'.\

View File

@ -50,7 +50,20 @@
<field name="model">project.issue</field> <field name="model">project.issue</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Issue Tracker Form"> <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,draft,pending" type="object" icon="terp-dialog-close"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<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"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Issue Tracker Form" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<field name="name"/> <field name="name"/>
<field name="project_id" required="True" on_change="on_change_project(project_id)"/> <field name="project_id" required="True" on_change="on_change_project(project_id)"/>
@ -86,15 +99,6 @@
<separator string= "Description" colspan="4"/> <separator string= "Description" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/> <field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/> <separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<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="terp-dialog-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" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page> </page>
<page string="Extra Info"> <page string="Extra Info">
<group col="4" colspan="4"> <group col="4" colspan="4">
@ -113,7 +117,10 @@
</group> </group>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>

View File

@ -10,13 +10,13 @@
<field name="project_id" position="attributes"> <field name="project_id" position="attributes">
<attribute name="on_change">on_change_project(project_id)</attribute> <attribute name="on_change">on_change_project(project_id)</attribute>
</field> </field>
<xpath expr="/form/notebook" position="before"> <xpath expr="//notebook" position="before">
<field name="analytic_account_id" <field name="analytic_account_id"
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]" domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
on_change='on_change_account_id(analytic_account_id)'/> on_change='on_change_account_id(analytic_account_id)'/>
</xpath> </xpath>
<xpath expr="//notebook/page[@string='Extra Info']" position="before"> <xpath expr="//notebook/page[@string='Extra Info']" position="before">
<page string="Worklogs"> <page string="Worklogs">
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}"> <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
<tree editable="top" string="Timesheets"> <tree editable="top" string="Timesheets">
<field name="name"/> <field name="name"/>

View File

@ -115,7 +115,7 @@ class project_phase(osv.osv):
'user_force_ids': fields.many2many('res.users', string='Force Assigned Users'), 'user_force_ids': fields.many2many('res.users', string='Force Assigned Users'),
'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}, 'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]},
help="The ressources on the project can be computed automatically by the scheduler"), help="The ressources on the project can be computed automatically by the scheduler"),
'state': fields.selection([('draft', 'New'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True, 'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'), ('pending', 'Pending'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\ help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
\n If the phase is over, the states is set to \'Done\'.'), \n If the phase is over, the states is set to \'Done\'.'),
'progress': fields.function(_compute_progress, string='Progress', help="Computed based on related tasks"), 'progress': fields.function(_compute_progress, string='Progress', help="Computed based on related tasks"),

View File

@ -141,7 +141,19 @@
<field name="model">project.phase</field> <field name="model">project.phase</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Project Phase"> <form layout="manual">
<div class="oe_form_topbar">
<button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
<button string="Done" name="set_done" states="pending,open" icon="terp-dialog-close"/>
<button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" 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>
<div class="oe_clear"/>
</div>
<sheet string="Project Phase" layout="auto">
<group colspan="6" col="6"> <group colspan="6" col="6">
<group colspan="6" col="7" > <group colspan="6" col="7" >
<field name="name" colspan="4"/> <field name="name" colspan="4"/>
@ -166,15 +178,6 @@
<field name="date_end"/> <field name="date_end"/>
</form> </form>
</field> </field>
<separator string="" colspan="4"/>
<group col="12" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>
<button string="Done" name="set_done" states="pending,open" icon="terp-dialog-close"/>
<button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
</group>
</page> </page>
<page string="Tasks Details"> <page string="Tasks Details">
<field colspan="4" name="task_ids" readonly="1" context="{'default_project_id' :project_id}" nolabel="1"> <field colspan="4" name="task_ids" readonly="1" context="{'default_project_id' :project_id}" nolabel="1">
@ -211,6 +214,7 @@
</page> </page>
</notebook> </notebook>
<newline/> <newline/>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -128,7 +128,7 @@ class report_account_analytic_planning(osv.osv):
'date_to':fields.date('End Date', required=True, states={'done':[('readonly', True)]}), 'date_to':fields.date('End Date', required=True, states={'done':[('readonly', True)]}),
'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines', states={'done':[('readonly', True)]}), 'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines', states={'done':[('readonly', True)]}),
'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True), 'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'Open'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', required=True), 'state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('open', 'Open'), ('done', 'Done')], 'Status', required=True),
'business_days': fields.integer('Business Days', required=True, states={'done':[('readonly', True)]}, help='Set here the number of working days within this planning for one person full time'), 'business_days': fields.integer('Business Days', required=True, states={'done':[('readonly', True)]}, help='Set here the number of working days within this planning for one person full time'),
'planning_user_ids': one2many_mod3('report_account_analytic.planning.user', 'planning_id', 'Planning By User'), 'planning_user_ids': one2many_mod3('report_account_analytic.planning.user', 'planning_id', 'Planning By User'),
'planning_account': fields.one2many('report_account_analytic.planning.account', 'planning_id', 'Planning By Account'), 'planning_account': fields.one2many('report_account_analytic.planning.account', 'planning_id', 'Planning By Account'),

View File

@ -26,8 +26,19 @@
<field name="model">report_account_analytic.planning</field> <field name="model">report_account_analytic.planning</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Planning by Account"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="action_open" states="draft" string="Open" type="object" icon="gtk-yes" />
<button name="action_done" states="open" string="Done" type="object" icon="gtk-jump-to" />
<button name="action_draft" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" />
<button name="action_cancel" states="draft,open" string="Cancel" type="object" icon="gtk-cancel" />
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Planning by Account" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1" /> <field name="name" select="1" />
<field name="code" select="1" /> <field name="code" select="1" />
<field name="user_id" select="1" /> <field name="user_id" select="1" />
@ -134,18 +145,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> </sheet>
<field name="state" select="1"
readonly="1" />
<button name="action_cancel" states="draft,open"
string="Cancel" type="object" icon="gtk-cancel" />
<button name="action_open" states="draft"
string="Open" type="object" icon="gtk-yes" />
<button name="action_done" states="open"
string="Done" type="object" icon="gtk-jump-to" />
<button name="action_draft" states="done,cancel"
string="Reset to Draft" type="object" icon="gtk-convert" />
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -109,7 +109,7 @@ class project_scrum_sprint(osv.osv):
'progress': fields.function(_compute, group_operator="avg", type='float', multi="progress", string='Progress (0-100)', help="Computed as: Time Spent / Total Time."), 'progress': fields.function(_compute, group_operator="avg", type='float', multi="progress", string='Progress (0-100)', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_compute, multi="effective_hours", string='Effective hours', help="Computed using the sum of the task work done."), 'effective_hours': fields.function(_compute, multi="effective_hours", string='Effective hours', help="Computed using the sum of the task work done."),
'expected_hours': fields.function(_compute, multi="expected_hours", string='Planned Hours', help='Estimated time to do the task.'), 'expected_hours': fields.function(_compute, multi="expected_hours", string='Planned Hours', help='Estimated time to do the task.'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('cancel','Cancelled'),('done','Done')], 'State', required=True), 'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('open','Open'),('pending','Pending'),('done','Done')], 'State', required=True),
} }
_defaults = { _defaults = {
'state': 'draft', 'state': 'draft',
@ -229,7 +229,7 @@ class project_scrum_product_backlog(osv.osv):
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'), 'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."), 'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'), 'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True), 'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('open','Open'),('pending','Pending'),('done','Done')], 'State', required=True),
'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', string='Progress', help="Computed as: Time Spent / Total Time."), 'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', string='Progress', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_compute, multi="effective_hours", string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True), 'effective_hours': fields.function(_compute, multi="effective_hours", string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'), 'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),

View File

@ -56,8 +56,21 @@
<field name="model">project.scrum.product.backlog</field> <field name="model">project.scrum.product.backlog</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Product backlog"> <form layout="manual">
<group colspan="4" col="8"> <div class="oe_form_topbar">
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="terp-dialog-close"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
<button type="object" string="Cancel" name="button_cancel" states="draft,open,pending" icon="gtk-stop"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Product backlog" layout="auto">
<group colspan="4" col="8" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="project_id" select="1"/> <field name="project_id" select="1"/>
<field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/> <field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
@ -109,15 +122,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> </sheet>
<field name="state" select="1" readonly="1"/>
<button type="object" string="Cancel" name="button_cancel" states="draft,open,pending" icon="gtk-stop"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="terp-dialog-close"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -232,8 +237,21 @@
<field name="model">project.scrum.sprint</field> <field name="model">project.scrum.sprint</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Scrum Sprint"> <form layout="manual">
<group colspan="4" col="6"> <div class="oe_form_topbar">
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="terp-dialog-close"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button name="%(project_scrum.report_scrum_sprint_burndown_chart)d"
string="Burndown Chart" type="action" icon="gtk-print"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
<div class="oe_right">
<field name="state" readonly="1" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Scrum Sprint" layout="auto">
<group colspan="4" col="6" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="project_id" on_change="onchange_project_id(project_id)"/> <field name="project_id" on_change="onchange_project_id(project_id)"/>
</group> </group>
@ -298,15 +316,7 @@
<field colspan="4" name="retrospective" nolabel="1"/> <field colspan="4" name="retrospective" nolabel="1"/>
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> </sheet>
<field name="state" readonly="1"/>
<button name="%(project_scrum.report_scrum_sprint_burndown_chart)d"
string="Burndown Chart" type="action" icon="gtk-print"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="terp-dialog-close"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -143,13 +143,13 @@ class purchase_order(osv.osv):
STATE_SELECTION = [ STATE_SELECTION = [
('draft', 'Request for Quotation'), ('draft', 'Request for Quotation'),
('cancel', 'Cancelled'),
('wait', 'Waiting'), ('wait', 'Waiting'),
('confirmed', 'Waiting Approval'), ('confirmed', 'Waiting Approval'),
('approved', 'Approved'), ('approved', 'Approved'),
('except_picking', 'Shipping Exception'), ('except_picking', 'Shipping Exception'),
('except_invoice', 'Invoice Exception'), ('except_invoice', 'Invoice Exception'),
('done', 'Done'), ('done', 'Done'),
('cancel', 'Cancelled')
] ]
_columns = { _columns = {

View File

@ -130,7 +130,23 @@
<field name="model">purchase.order</field> <field name="model">purchase.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Purchase Order"> <form layout="manual">
<div class="oe_form_topbar">
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
<button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
<button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"/>
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Purchase Order" layout="auto">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name"/> <field name="name"/>
<field name="date_order"/> <field name="date_order"/>
@ -164,18 +180,6 @@
<field name="amount_total" sum="Total amount"/> <field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/> <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
</group> </group>
<group col="11" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
<button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
<button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"/>
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
</group>
</page> </page>
<page string="Delivery &amp; Invoicing"> <page string="Delivery &amp; Invoicing">
<group colspan="2" col="2"> <group colspan="2" col="2">
@ -203,7 +207,10 @@
<field colspan="4" name="notes" nolabel="1"/> <field colspan="4" name="notes" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>
@ -506,7 +513,7 @@
<field name="inherit_id" ref="procurement.procurement_form_view"/> <field name="inherit_id" ref="procurement.procurement_form_view"/>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='close_move']" position="before"> <xpath expr="//field[@name='close_move']" position="before">
<field name="purchase_id"/> <field name="purchase_id"/>
</xpath> </xpath>
</field> </field>

View File

@ -7,7 +7,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="stock.view_move_form"/> <field name="inherit_id" ref="stock.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/group/field[@name='tracking_id']" position="before"> <xpath expr="//field[@name='tracking_id']" position="before">
<field name="purchase_line_id" colspan="2" /> <field name="purchase_line_id" colspan="2" />
</xpath> </xpath>
</field> </field>

View File

@ -46,7 +46,18 @@
<field name="type">form</field> <field name="type">form</field>
<field name="model">purchase.requisition</field> <field name="model">purchase.requisition</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Purchase Requisition"> <form layout="manual">
<div class="oe_form_topbar">
<button name="tender_in_progress" states="draft" string="Start" type="object" icon="gtk-apply" />
<button name="tender_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" />
<button name="tender_done" states="in_progress" string="Done" type="object" icon="gtk-jump-to" />
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" icon="gtk-cancel" />
<div class="oe_right">
<field name="state" nolabel="1" select="1" readonly ="1" widget="statusbar" statusbar_visible="draft,in_progress,done" statusbar_colors='{"in_progress":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Purchase Requisition" layout="auto">
<group colspan="4" col="6"> <group colspan="4" col="6">
<field name="name"/> <field name="name"/>
<field name="user_id"/> <field name="user_id"/>
@ -73,14 +84,6 @@
</form> </form>
</field> </field>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" readonly ="1" widget="statusbar" statusbar_visible="draft,in_progress,done" statusbar_colors='{"in_progress":"blue"}'/>
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" icon="gtk-cancel" />
<button name="tender_in_progress" states="draft" string="Start" type="object" icon="gtk-apply" />
<button name="tender_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" />
<button name="tender_done" states="in_progress" string="Done" type="object" icon="gtk-jump-to" />
</group>
</page> </page>
<page string="Quotations"> <page string="Quotations">
<field colspan="4" name="purchase_ids" nolabel="1" mode="tree,form"> <field colspan="4" name="purchase_ids" nolabel="1" mode="tree,form">
@ -109,6 +112,7 @@
<field name="description" colspan="4" nolabel="1"/> <field name="description" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -197,7 +201,7 @@
<field name="model">procurement.order</field> <field name="model">procurement.order</field>
<field name="inherit_id" ref="procurement.procurement_form_view"/> <field name="inherit_id" ref="procurement.procurement_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='close_move']" position="after"> <xpath expr="//field[@name='close_move']" position="after">
<field name="requisition_id"/> <field name="requisition_id"/>
</xpath> </xpath>
</field> </field>

View File

@ -204,13 +204,13 @@ class sale_order(osv.osv):
'client_order_ref': fields.char('Customer Reference', size=64), 'client_order_ref': fields.char('Customer Reference', size=64),
'state': fields.selection([ 'state': fields.selection([
('draft', 'Quotation'), ('draft', 'Quotation'),
('cancel', 'Cancelled'),
('waiting_date', 'Waiting Schedule'), ('waiting_date', 'Waiting Schedule'),
('manual', 'To Invoice'), ('manual', 'To Invoice'),
('progress', 'In Progress'), ('progress', 'In Progress'),
('shipping_except', 'Shipping Exception'), ('shipping_except', 'Shipping Exception'),
('invoice_except', 'Invoice Exception'), ('invoice_except', 'Invoice Exception'),
('done', 'Done'), ('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), ], '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)]}), '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."), 'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),

View File

@ -96,23 +96,24 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form layout="manual"> <form layout="manual">
<div class="oe_form_topbar"> <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_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="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_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="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="%(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="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="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="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="%(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_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"> <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"}'/> <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
</div> </div>
<div class="oe_clear"/>
</div> </div>
<sheet string="Sales Order" layout="auto"> <sheet string="Sales Order" layout="auto">
<group col="6" colspan="4" class="oe_form_header"> <group col="6" colspan="4" class="oe_form_header">

View File

@ -19,7 +19,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="stock.view_move_form"/> <field name="inherit_id" ref="stock.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/group/field[@name='tracking_id']" position="before"> <xpath expr="//field[@name='tracking_id']" position="before">
<field name="sale_line_id" colspan="2"/> <field name="sale_line_id" colspan="2"/>
</xpath> </xpath>
</field> </field>

View File

@ -8,7 +8,7 @@
<field name="inherit_id" ref="mrp.mrp_production_form_view"/> <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_prod_id']" position="after"> <xpath expr="//field[@name='move_prod_id']" position="after">
<field name="sale_name"/> <field name="sale_name"/>
<field name="sale_ref"/> <field name="sale_ref"/>
</xpath> </xpath>

View File

@ -630,11 +630,12 @@ class stock_picking(osv.osv):
'move_type': fields.selection([('direct', 'Partial'), ('one', 'All at once')], 'Delivery Method', required=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="It specifies goods to be deliver partially or all at once"), 'move_type': fields.selection([('direct', 'Partial'), ('one', 'All at once')], 'Delivery Method', required=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="It specifies goods to be deliver partially or all at once"),
'state': fields.selection([ 'state': fields.selection([
('draft', 'Draft'), ('draft', 'Draft'),
('cancel', 'Cancelled'),
('auto', 'Waiting Another Operation'), ('auto', 'Waiting Another Operation'),
('confirmed', 'Waiting Availability'), ('confirmed', 'Waiting Availability'),
('assigned', 'Ready to Transfer'), ('assigned', 'Ready to Transfer'),
('done', 'Transferred'), ('done', 'Transferred'),
('cancel', 'Cancelled'),], 'State', readonly=True, select=True, help=""" ], 'State', readonly=True, select=True, help="""
* Draft: not confirmed yet and will not be scheduled until confirmed\n * Draft: not confirmed yet and will not be scheduled until confirmed\n
* Waiting Another Operation: waiting for another move to proceed before it becomes automatically available (e.g. in Make-To-Order flows)\n * Waiting Another Operation: waiting for another move to proceed before it becomes automatically available (e.g. in Make-To-Order flows)\n
* Waiting Availability: still waiting for the availability of products\n * Waiting Availability: still waiting for the availability of products\n
@ -1632,11 +1633,12 @@ class stock_move(osv.osv):
'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}), 'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}),
'note': fields.text('Notes'), 'note': fields.text('Notes'),
'state': fields.selection([('draft', 'New'), 'state': fields.selection([('draft', 'New'),
('cancel', 'Cancelled'),
('waiting', 'Waiting Another Move'), ('waiting', 'Waiting Another Move'),
('confirmed', 'Waiting Availability'), ('confirmed', 'Waiting Availability'),
('assigned', 'Available'), ('assigned', 'Available'),
('done', 'Done'), ('done', 'Done'),
('cancel', 'Cancelled')], 'State', readonly=True, select=True, ], 'State', readonly=True, select=True,
help= "* New: When the stock move is created and not yet confirmed.\n"\ help= "* New: When the stock move is created and not yet confirmed.\n"\
"* Waiting Another Move: This state can be seen when a move is waiting for another one, for example in a chained flow.\n"\ "* Waiting Another Move: This state can be seen when a move is waiting for another one, for example in a chained flow.\n"\
"* Waiting Availability: This state is reached when the procurement resolution is not straight forward. It may need the scheduler to run, a component to me manufactured...\n"\ "* Waiting Availability: This state is reached when the procurement resolution is not straight forward. It may need the scheduler to run, a component to me manufactured...\n"\
@ -2665,7 +2667,7 @@ class stock_inventory(osv.osv):
'date_done': fields.datetime('Date done'), 'date_done': fields.datetime('Date done'),
'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}), 'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}),
'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'), 'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'),
'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Confirmed'),('cancel','Cancelled')), 'State', readonly=True, select=True), 'state': fields.selection( (('draft', 'Draft'), ('cancel','Cancelled'), ('confirm','Confirmed'), ('done', 'Done')), 'State', readonly=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
} }

View File

@ -108,7 +108,19 @@
<field name="model">stock.inventory</field> <field name="model">stock.inventory</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Physical Inventory"> <form layout="manual">
<div class="oe_form_topbar">
<button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
<button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Physical Inventory" layout="auto">
<group class="oe_form_header">
<field name="name"/> <field name="name"/>
<field name="date"/> <field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/> <field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -167,15 +179,8 @@
</field> </field>
</page> </page>
</notebook> </notebook>
<group col="2" colspan="2">
<field name="state"/>
</group>
<group col="3" colspan="2">
<button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
<button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
<button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -1192,7 +1197,18 @@
<field name="type">form</field> <field name="type">form</field>
<field eval="4" name="priority"/> <field eval="4" name="priority"/>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Stock Moves" layout="auto">
<group colspan="4" col="7"> <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_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)"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1243,15 +1259,7 @@
states="draft,waiting,confirmed,assigned" states="draft,waiting,confirmed,assigned"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/> string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
</group> </group>
</sheet>
<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>
</form> </form>
</field> </field>
</record> </record>
@ -1378,7 +1386,18 @@
<field name="type">form</field> <field name="type">form</field>
<field eval="6" name="priority"/> <field eval="6" name="priority"/>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Receive Products" layout="auto">
<group colspan="4" col="7"> <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_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)"/> <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1429,15 +1448,7 @@
states="draft,waiting,confirmed,assigned,done" states="draft,waiting,confirmed,assigned,done"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/> string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
</group> </group>
</sheet>
<separator colspan="4"/>
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,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="Confirm &amp; Receive" type="action" states="assigned" icon="gtk-go-forward"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -12,17 +12,24 @@
<field name="model">stock.period</field> <field name="model">stock.period</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Stock Periods"> <form layout="manual">
<div class="oe_form_topbar">
<button name="button_open" string="Open" icon="gtk-ok" states="draft" type="object"/>
<button name="button_close" string="Close" icon="gtk-stop" states="open" type="object"/>
<div class="oe_right">
<field name="state" select="1" widget="statusbar" nolabel="1" statusbar_visible="draft,open"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Stock Periods" layout="auto">
<group class="oe_form_header">
<field name="name" colspan="2"/> <field name="name" colspan="2"/>
<newline/> <newline/>
<field name="date_start"/> <field name="date_start"/>
<field name="date_stop"/> <field name="date_stop"/>
<separator string="State" colspan="4"/> <separator string="State" colspan="4"/>
<group col="4" colspan="4">
<field name="state" select="1" readonly="1"/>
<button name="button_open" string="Open" icon="gtk-ok" states="draft" type="object"/>
<button name="button_close" string="Close" icon="gtk-stop" states="open" type="object"/>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -78,8 +85,16 @@
<field name="model">stock.sale.forecast</field> <field name="model">stock.sale.forecast</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Stock and Sales Forecast"> <form layout="manual">
<group colspan = "4" col = "4"> <div class="oe_form_topbar">
<button name="action_validate" icon="gtk-apply" string="Approve" states="draft" type="object" />
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Stock and Sales Forecast" layout="auto">
<group colspan = "4" col = "4" class="oe_form_header">
<group colspan = "2" col="2" > <group colspan = "2" col="2" >
<field name="company_id" select="1" <field name="company_id" select="1"
groups="base.group_multi_company" groups="base.group_multi_company"
@ -99,10 +114,6 @@
<field name="user_id"/> <field name="user_id"/>
<field name="product_amt" on_change="product_amt_change(product_amt, product_uom, product_id)" /> <field name="product_amt" on_change="product_amt_change(product_amt, product_uom, product_id)" />
<field name="product_qty" /> <field name="product_qty" />
<field name="state"/>
<label string = ""/>
<button name="action_validate" icon="gtk-apply" string="Approve" states="draft" type="object" colspan = "1"/>
</group> </group>
</group> </group>
<separator colspan ="4" string="Sales History"/> <separator colspan ="4" string="Sales History"/>
@ -147,6 +158,7 @@
<button name="calculate_sales_history" icon="gtk-execute" <button name="calculate_sales_history" icon="gtk-execute"
string="Calculate Sales History" type="object" colspan = "1" states="draft" /> string="Calculate Sales History" type="object" colspan = "1" states="draft" />
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -13,8 +13,18 @@
<field name="model">subscription.subscription</field> <field name="model">subscription.subscription</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Subscriptions"> <form layout="manual">
<group col="6" colspan="4"> <div class="oe_form_topbar">
<button name="set_process" states="draft" string="Process" type="object" icon="gtk-go-forward"/>
<button name="set_done" states="running" string="Stop" type="object" icon="gtk-stop"/>
<button name="set_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,running"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Subscriptions" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="partner_id" select="1"/> <field name="partner_id" select="1"/>
<field name="user_id" select="1"/> <field name="user_id" select="1"/>
@ -32,12 +42,6 @@
<field colspan="4" name="notes" nolabel="1"/> <field colspan="4" name="notes" nolabel="1"/>
<separator colspan="4"/> <separator colspan="4"/>
<field colspan="4" name="cron_id" readonly="1"/> <field colspan="4" name="cron_id" readonly="1"/>
<field name="state" readonly="1"/>
<group col="3" colspan="2">
<button name="set_process" states="draft" string="Process" type="object" icon="gtk-go-forward"/>
<button name="set_done" states="running" string="Stop" type="object" icon="gtk-stop"/>
<button name="set_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
</group>
</page> </page>
<page string="Documents created"> <page string="Documents created">
<field colspan="4" name="doc_lines" nolabel="1" widget="one2many_list"/> <field colspan="4" name="doc_lines" nolabel="1" widget="one2many_list"/>
@ -47,6 +51,7 @@
<field name="note" colspan="4" nolabel="1"/> <field name="note" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>

View File

@ -59,7 +59,7 @@ class survey(osv.osv):
help="Set to one if survey is answerable only once"), help="Set to one if survey is answerable only once"),
'response_user': fields.integer('Maximum Answer per User', 'response_user': fields.integer('Maximum Answer per User',
help="Set to one if you require only one 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"), 'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"),
'tot_start_survey': fields.integer("Total Started Survey", readonly=1), 'tot_start_survey': fields.integer("Total Started Survey", readonly=1),
'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1), 'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1),
@ -702,7 +702,7 @@ class survey_request(osv.osv):
'email': fields.char("E-mail", size=64), 'email': fields.char("E-mail", size=64),
'survey_id': fields.many2one("survey", "Survey", required=1, ondelete='cascade'), 'survey_id': fields.many2one("survey", "Survey", required=1, ondelete='cascade'),
'response': fields.many2one('survey.response', 'Answer'), 'response': fields.many2one('survey.response', 'Answer'),
'state': fields.selection([('draft','Draft'),('waiting_answer', 'Waiting Answer'),('done', 'Done'),('cancel', 'Cancelled')], 'State', readonly=1) 'state': fields.selection([('draft','Draft'),('cancel', 'Cancelled'),('waiting_answer', 'Waiting Answer'),('done', 'Done')], 'State', readonly=1)
} }
_defaults = { _defaults = {
'state': lambda * a: 'draft', 'state': lambda * a: 'draft',

View File

@ -18,7 +18,17 @@
<field name="model">survey</field> <field name="model">survey</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <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 class="oe_clear"/>
</div>
<sheet string="Survey" layout="auto">
<field name="title" select="1"/> <field name="title" select="1"/>
<group col="6" colspan="6"> <group col="6" colspan="6">
<field name="responsible_id"/> <field name="responsible_id"/>
@ -180,16 +190,6 @@
</field> </field>
</form> </form>
</field> </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>
<page string="Other"> <page string="Other">
<group colspan="6" col='4'> <group colspan="6" col='4'>
@ -223,6 +223,7 @@
</field> </field>
</page> </page>
</notebook> </notebook>
</sheet>
</form> </form>
</field> </field>
</record> </record>
@ -1058,18 +1059,25 @@
<field name="model">survey.request</field> <field name="model">survey.request</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Survey Request"> <form layout="manual">
<div class="oe_form_topbar">
<button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
<button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" icon="gtk-new"/>
<button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
<button name="survey_req_cancel" string="Cancel" states="waiting_answer" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,waiting_answer"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Survey Request" layout="auto">
<group class="oe_form_header">
<field name="date_deadline"/> <field name="date_deadline"/>
<field name="survey_id"/> <field name="survey_id"/>
<field name="user_id" on_change="on_change_user(user_id)"/> <field name="user_id" on_change="on_change_user(user_id)"/>
<field name="response" readonly="1"/> <field name="response" readonly="1"/>
<group colspan="4" col="6">
<field name="state"/>
<button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
<button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
<button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object" icon="gtk-new"/>
<button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>