[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([
('draft','Draft'),
('cancel','Cancelled'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
('open','Open'),
('paid','Paid'),
('cancel','Cancelled')
('paid','Paid')
],'State', select=True, readonly=True,
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. \

View File

@ -144,8 +144,20 @@
<field name="type">form</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Supplier Invoice">
<group col="8" colspan="4">
<form layout="manual">
<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="number" readonly="1"/>
<field name="type" invisible="1"/>
@ -203,15 +215,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<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>
</page>
<page string="Other Info">
@ -243,7 +247,10 @@
</field>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@ -253,8 +260,22 @@
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice">
<group colspan="4" col="8">
<form layout="manual">
<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="number"/>
<field name="type" invisible="1"/>
@ -297,17 +318,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<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>
</page>
<page string="Other Info">
@ -338,7 +349,10 @@
</field>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>

View File

@ -11,8 +11,17 @@
<field name="model">account.fiscalyear</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fiscalyear">
<group>
<form layout="manual">
<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="code"/>
<field name="date_start"/>
@ -30,12 +39,7 @@
<field name="special"/>
</form>
</field>
<separator colspan="4" string="States"/>
<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>
</sheet>
</form>
</field>
</record>
@ -92,7 +96,16 @@
<field name="model">account.period</field>
<field name="type">form</field>
<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="code"/>
<field name="date_start"/>
@ -100,9 +113,8 @@
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="fiscalyear_id" widget="selection"/>
<field name="special"/>
<separator colspan="4" string="States"/>
<field name="state"/>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
</group>
</sheet>
</form>
</field>
</record>
@ -592,8 +604,18 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank Statement">
<group col="7" colspan="4">
<form layout="manual">
<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="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"/>
@ -637,13 +659,7 @@
<field colspan="4" name="move_line_ids" nolabel="1"/>
</page>
</notebook>
<group col="8" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -653,8 +669,18 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank Statement">
<group col="7" colspan="4">
<form layout="manual">
<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="date" select="1" on_change="onchange_date(date, company_id)"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
@ -684,12 +710,9 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<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>
</sheet>
</form>
</field>
</record>
@ -1342,8 +1365,17 @@
<field name="model">account.move</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal Entries">
<group colspan="4" col="6">
<form layout="manual">
<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="ref"/>
<field name="to_check"/>
@ -1452,13 +1484,9 @@
</field>
<separator colspan="4" string="Internal Note"/>
<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>
</notebook>
</sheet>
</form>
</field>
</record>
@ -2611,8 +2639,18 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Statement">
<group col="6" colspan="4">
<form layout="manual">
<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='company_id' widget="selection" groups="base.group_multi_company" />
<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"/>
</group>
</group>
<group col="8" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -303,10 +303,10 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<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"/>
</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"/>
</xpath>
</field>

View File

@ -78,8 +78,18 @@
<field name="model">account.asset.asset</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Asset">
<group col="6" colspan="4">
<form layout="manual">
<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="category_id" on_change="onchange_category_id(category_id)"/>
<field name="code"/>
@ -111,14 +121,6 @@
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</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 string="Depreciation Board">
<field name="depreciation_line_ids" colspan="4" nolabel="1" mode="tree,graph">
@ -148,6 +150,7 @@
<field name="note" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -42,17 +42,17 @@
<field name="type">form</field>
<field name="arch" type="xml">
<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"/>
</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="state" invisible="1"/>
</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"/>
</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="state" invisible="1"/>
</xpath>

View File

@ -62,7 +62,7 @@ class crossovered_budget(osv.osv):
'validating_user_id': fields.many2one('res.users', 'Validate User', 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)]}),
'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)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
}

View File

@ -104,7 +104,20 @@
<field name="model">crossovered.budget</field>
<field name="type">form</field>
<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="code" colspan="1" select="1" 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"/>
</form>
</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>
</sheet>
</form>
</field>
</record>

View File

@ -19,7 +19,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<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"/>
</xpath>
</field>
@ -31,7 +31,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<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"/>
</xpath>
</field>

View File

@ -47,7 +47,7 @@
<field name="inherit_id" ref="account.invoice_form"/>
<field name="type">form</field>
<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 -->
<field name="invoice_line" invisible="True"/>
<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.'),
'state': fields.selection([
('draft', 'Draft'),
('open', 'Confirmed'),
('cancel', 'Cancelled'),
('open', 'Confirmed'),
('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\'.'),
'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="type">form</field>
<field name="arch" type="xml">
<form string="Payment order">
<group col="6" colspan="4">
<form layout="manual">
<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="mode" widget='selection'/>
<field name="user_id"/>
@ -162,13 +173,7 @@
</field>
<field name="date_created"/>
<field name="date_done"/>
<field name="state" readonly="1" select="1"/>
<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>
</sheet>
</form>
</field>
</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)]}),
'state':fields.selection(
[('draft','Draft'),
('cancel','Cancelled'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancelled')
('posted','Posted')
], 'State', readonly=True, size=32,
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. \

View File

@ -40,8 +40,19 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Accounting Voucher">
<group col="6" colspan="4">
<form layout="manual">
<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="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)"/>
@ -101,13 +112,7 @@
</field>
</page>
</notebook>
<group col="10" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -218,7 +223,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<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}"/>
</xpath>
</field>
@ -230,7 +235,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<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}"/>
</xpath>
</field>
@ -241,7 +246,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
<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}"/>
</xpath>
</field>
@ -253,7 +258,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
<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}"/>
</xpath>
</field>

View File

@ -143,8 +143,19 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bill Payment">
<group col="6" colspan="4">
<form layout="manual">
<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="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"
@ -249,13 +260,7 @@
</field>
</page>
</notebook>
<group col="10" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -292,8 +297,19 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Customer Payment">
<group col="6" colspan="4">
<form layout="manual">
<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="currency_id" invisible="1"/>
<field name="amount"
@ -401,13 +417,7 @@
</field>
</page>
</notebook>
<group col="10" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

@ -80,8 +80,20 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales Receipt">
<group col="6" colspan="4">
<form layout="manual">
<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="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)"/>
@ -148,16 +160,7 @@
</field>
</page>
</notebook>
<group col="8" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -206,8 +209,21 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Supplier Voucher">
<group col="6" colspan="4">
<form layout="manual">
<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="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)"/>
@ -268,17 +284,7 @@
</field>
</page>
</notebook>
<group col="10" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

@ -171,7 +171,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'),
'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.
'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.\
\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\'. \

View File

@ -47,7 +47,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace">
<xpath expr="/form/sheet/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace">
<field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount, journal_id)"/>
</xpath>
</field>

View File

@ -34,7 +34,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_analytic_account_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page" position="after">
<xpath expr="//notebook/page" position="after">
<page string="Users/Products Rel.">
<field name="user_product_ids" colspan="4" nolabel="1"/>
</page>
@ -50,7 +50,7 @@
<field name="priority" eval="18"/>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='timesheet_ids']/tree/field[@name='account_id']" position="replace">
<xpath expr="//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)"/>
</xpath>
</field>
@ -64,7 +64,7 @@
<field name="priority" eval="19"/>
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace">
<xpath expr="//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)"/>
</xpath>
</field>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -58,7 +58,19 @@
<field name="model">crm.phonecall</field>
<field name="type">form</field>
<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">
<field name="name" required="1"/>
<field name="partner_phone"/>
@ -103,25 +115,10 @@
</group>
<separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" />
<separator colspan="4" />
<group col="8" colspan="4">
<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>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>

View File

@ -66,7 +66,19 @@
<field name="model">crm.claim</field>
<field name="type">form</field>
<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>
<field name="name" />
<field name="date"/>
@ -102,25 +114,6 @@
</group>
<separator colspan="4" string="Claim/Action Description"/>
<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 string="Follow Up">
<group colspan="2" col="2">
@ -170,6 +163,7 @@
</page>
</notebook>
</group>
</sheet>
</form>
</field>
</record>

View File

@ -77,8 +77,21 @@
<field name="model">crm.fundraising</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Funds Form">
<group colspan="4" col="6">
<form layout="manual">
<div class="oe_form_topbar">
<button name="case_close" string="Done" states="open,pending" type="object" icon="gtk-close" />
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_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="section_id" colspan="1" widget="selection"/>
<field name="user_id" string="Responsible"/>
@ -103,28 +116,6 @@
</group>
<separator colspan="4" string="Notes"/>
<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 string="Communication &amp; History">
<group colspan="4">
@ -170,6 +161,7 @@
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -28,8 +28,21 @@
<field name="model">crm.helpdesk</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Helpdesk Support">
<group colspan="4" col="7">
<form layout="manual">
<div class="oe_form_topbar">
<button name="case_close" states="open,pending" string="Close" type="object" icon="gtk-jump-to" />
<button name="case_open" states="draft,pending" string="Open" type="object" icon="gtk-go-forward" />
<button name="case_pending" states="draft,open" string="Pending" type="object" icon="gtk-media-pause" />
<button name="case_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="section_id" widget="selection"/>
<field name="user_id" select="1"/>
@ -64,30 +77,6 @@
<separator colspan="4" string="Notes"/>
<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 string="Communication &amp; History">
<group colspan="4">
@ -136,6 +125,7 @@
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</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)]}),
'state': fields.selection([
('draft', 'Unconfirmed'),
('cancel', 'Cancelled'),
('confirm', 'Confirmed'),
('done', 'Done'),
('cancel', 'Cancelled')],
('done', 'Done')],
'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\'.'),
'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)]}),
'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'),
('open', 'Confirmed'),
('cancel', 'Cancelled'),
('open', 'Confirmed'),
('done', 'Attended')], 'State',
size=16, readonly=True),
}

View File

@ -50,8 +50,19 @@
<field name="model">event.event</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Events">
<group col="6" colspan="4">
<form layout="manual">
<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="date_begin"/>
<field name="date_end"/>
@ -96,13 +107,6 @@
</group>
</form>
</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 string="Speakers">
<field name="main_speaker_id" domain="[('speaker','=',True)]" context="{'default_speaker':1}"/>
@ -127,6 +131,7 @@
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -156,9 +161,9 @@
</tree>
</field>
</record>
<!-- Event Kanban View -->
<record model="ir.ui.view" id="view_event_kanban">
<field name="name">event.event.kanban</field>
<field name="model">event.event</field>
@ -353,7 +358,18 @@
<field name="model">event.registration</field>
<field name="type">form</field>
<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">
<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)"/>
@ -376,15 +392,6 @@
<field name="event_begin_date" />
<field name="event_end_date" />
</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 string="Emails">
<!--
@ -406,6 +413,7 @@
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -110,7 +110,7 @@ class hr_job(osv.osv):
'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'),
'state': fields.selection([('open', 'In Position'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', readonly=True, required=True),
'state': fields.selection([('open', 'In Position'),('recruit', 'In Recruitement'),('old', 'Old')], 'State', readonly=True, required=True),
}
_defaults = {
'expected_employees': 1,

View File

@ -345,7 +345,17 @@
<field name="model">hr.job</field>
<field name="type">form</field>
<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">
<field name="name" />
<field name="department_id" />
@ -367,12 +377,7 @@
<field name="employee_ids" colspan="4" nolabel="1" widget="many2many" mode="tree,form"/>
</page>
</notebook>
<group col="6" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -154,7 +154,19 @@
<field name="model">hr_evaluation.evaluation</field>
<field name="type">form</field>
<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">
<separator string="Appraisal Data" colspan="4"/>
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
@ -198,20 +210,7 @@
<field name="note_summary" colspan="4" nolabel="1"/>
</page>
</notebook>
<newline/>
<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>
</sheet>
</form>
</field>
</record>

View File

@ -79,11 +79,12 @@ class hr_expense_expense(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([
('draft', 'New'),
('cancelled', 'Refused'),
('confirm', 'Waiting Approval'),
('accepted', 'Approved'),
('invoiced', 'Invoiced'),
('paid', 'Reimbursed'),
('cancelled', 'Refused')],
('paid', 'Reimbursed')
],
'State', readonly=True, help='When the expense request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Confirmation\'.\
\nIf the admin accepts it, the state is \'Accepted\'.\n If an invoice is made for the expense request, the state is \'Invoiced\'.\n If the expense is paid to user, the state is \'Reimbursed\'.'),
}

View File

@ -65,7 +65,19 @@
<field name="type">form</field>
<field name="model">hr.expense.expense</field>
<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">
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
<field name="name"/>
@ -99,14 +111,6 @@
</group>
</form>
</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 string="Other Info">
<group col="2" colspan="2">
@ -124,6 +128,7 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -112,8 +112,8 @@ class hr_holidays(osv.osv):
_columns = {
'name': fields.char('Description', required=True, size=64),
'state': fields.selection([('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'),('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved')],
'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 \'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, 'second_validate', cr)
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})
return True

View File

@ -63,7 +63,19 @@
<field name="type">form</field>
<field name="priority">1</field>
<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">
<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"/>
@ -87,17 +99,12 @@
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
<separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/>
<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>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@ -108,8 +115,20 @@
<field name="model">hr.holidays</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Allocation Request">
<group col="8" colspan="4">
<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"/>
<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="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')]}">
@ -130,17 +149,12 @@
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
<separator string="Reasons" 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>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>

View File

@ -260,8 +260,20 @@
<field name="model">hr.payslip</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslip">
<group col="6" colspan="4">
<form layout="manual">
<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="number"/>
<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"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
<group col="10" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -720,8 +724,18 @@
<field name="model">hr.payslip.run</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslips Batches">
<group col="6" colspan="4">
<form layout="manual">
<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="credit_note"/>
<field name="date_start"/>
@ -732,12 +746,7 @@
<field name="slip_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
<group col="6" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -76,11 +76,11 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/>
<button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div>

View File

@ -21,16 +21,20 @@
<separator colspan="4" string="Invoicing Statistics"/>
<field name="amount_invoiced"/>
</group>
<separator colspan="4"/>
<group col="9" colspan="8">
<field name="state" readonly="1" widget="statusbar"
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"/>
</group>
<xpath expr="/form/sheet" position='before'>
<div class="oe_form_topbar">
<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"/>
</group>
</group>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close,draft" icon="gtk-ok"/>
<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>
</record>

View File

@ -60,8 +60,19 @@
<field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Timesheet">
<group colspan="4" col="6">
<form layout="manual">
<div class="oe_form_topbar">
<button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/>
<button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="new,confirm,done"/>
</div>
<div 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="user_id" invisible="1"/>
<field name="date_from"/>
@ -142,13 +153,7 @@
</group>
</page>
</notebook>
<group col="6" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
<button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
<button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>
</group>
</sheet>
</form>
</field>
</record>

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)]}),
'state': fields.selection([('draft', 'New'),
('open', 'Opened'),
('close', 'Accepted'),
('cancel', 'Refused')],
('cancel', 'Refused'),
('close', 'Accepted')],
'State', readonly=True,
help='When the Idea is created the state is \'Draft\'.\n It is \
opened by the user, the state is \'Opened\'.\

View File

@ -182,8 +182,18 @@
<field name="model">idea.idea</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="New Idea">
<group col="6" colspan="4">
<form layout="manual">
<div class="oe_form_topbar">
<button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,close"/>
</div>
<div 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="category_id" select="1"/>
<field name="open_date" select="1"/>
@ -234,15 +244,9 @@
<field name="nbr"/>
</tree>
</field>
</page>
</notebook>
<group colspan="4" col="6">
<field name="state" widget="statusbar" statusbar_visible="draft,open,close"/>
<button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
</group>
</sheet>
</form>
</field>
</record>

View File

@ -23,7 +23,16 @@
<field name="name">Order</field>
<field name="model">lunch.order</field>
<field name="arch" type="xml">
<form string="Order">
<form layout="manual">
<div class="oe_form_topbar">
<button name="%(action_lunch_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/>
<button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirmed"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Order" layout="auto">
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="product" select="1" on_change="onchange_product(product)"/>
@ -31,13 +40,7 @@
<field name="descript"/>
<field name="price"/>
<field name="cashmove"/>
<newline/>
<separator string="" colspan="4"/>
<group colspan="4" col="4">
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed"/>
<button name="%(action_lunch_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/>
<button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/>
</group>
</sheet>
</form>
</field>
</record>

View File

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

View File

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

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'))]),
'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'),
'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\'.\
\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),

View File

@ -631,7 +631,21 @@
<field name="model">mrp.production</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Manufacturing Orders">
<form layout="manual">
<div class="oe_form_topbar">
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
<button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
<button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Manufacturing Orders" layout="auto">
<group colspan="4" col="7">
<field name="name" string="Reference"/>
<field name="date_planned"/>
@ -698,17 +712,6 @@
states="done,cancel"/>
</tree>
</field>
<separator colspan="4"/>
<group col="9" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
<button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/>
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
<button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/>
</group>
</page>
<page string="Finished Products">
<field colspan="2" name="move_created_ids" nolabel="1" widget="one2many_list"
@ -786,7 +789,10 @@
<field name="move_prod_id"/>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@ -961,10 +967,10 @@
<field name="type">form</field>
<field name="arch" type="xml">
<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)]"/>
</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">
<separator colspan="4" string="Properties" />
<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"
_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" \
"* 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" \

View File

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

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)]"),
'state': fields.selection([
('draft','Quotation'),
('cancel','Cancel'),
('confirmed','Confirmed'),
('ready','Ready to Repair'),
('under_repair','Under Repair'),
('ready','Ready to Repair'),
('2binvoiced','To be Invoiced'),
('invoice_except','Invoice Exception'),
('done','Done'),
('cancel','Cancel')
('done','Done')
], 'State', readonly=True,
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. \

View File

@ -27,8 +27,26 @@
<field name="model">mrp.repair</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Repairs order">
<group col="6" colspan="4">
<form layout="manual">
<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="product_id" select="1" on_change="onchange_product_id(product_id)"/>
<field name="deliver_bool"/>
@ -99,21 +117,6 @@
<field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
</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 string="Invoicing">
<field name="invoice_method" colspan="4"/>
@ -171,6 +174,7 @@
<field colspan="4" name="quotation_notes" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -16,8 +16,19 @@
<field name="model">pos.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="PoS Orders">
<group col="7" colspan="4">
<form layout="manual">
<div class="oe_form_topbar">
<button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft"/>
<button name="%(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="date_order"/>
<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="%(action_pos_discount)d" string="Discount" icon="gtk-remove" type="action" states="draft" />
</group>
<separator colspan="4"/>
<group colspan="4" col="8">
<field name="state" widget="statusbar" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/>
<button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft"/>
<button name="refund" string="Return Products" type="object" icon="gtk-ok"
attrs="{'invisible':[('state','=','draft')]}"/>
<button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
</group>
</page>
<page string="Payment">
<field name="statement_ids" colspan="4" nolabel="1">
@ -99,6 +101,7 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</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."),
'state': fields.selection([
('draft','Draft'),
('cancel','Cancelled'),
('confirmed','Confirmed'),
('exception','Exception'),
('running','Running'),
('cancel','Cancel'),
('ready','Ready'),
('done','Done'),
('waiting','Waiting')], 'State', required=True,

View File

@ -46,8 +46,19 @@
<field name="model">procurement.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Procurement">
<group col="2" colspan="2">
<form layout="manual">
<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"/>
<field name="name" string="Procurement Reason"/>
<field name="origin"/>
@ -72,13 +83,6 @@
<separator colspan="4" string="Status"/>
<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 string="Extra Information">
<separator colspan="4" string="Details"/>
@ -91,6 +95,7 @@
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</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),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State', readonly=True, required=True,
'state': fields.selection([('draft', 'New'),('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.\
\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',
@ -1300,7 +1300,7 @@ class project_task_history(osv.osv):
_columns = {
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True),
'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),
'date': fields.date('Date', select=True),
'end_date': fields.function(_get_date, string='End Date', type="date", store={

View File

@ -20,16 +20,17 @@
<field name="arch" type="xml">
<form string="Project" layout="manual">
<div class="oe_form_topbar">
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/>
<button name="set_done" string="Done" type="object" states="open,pending" icon="terp-dialog-close"/>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close" icon="gtk-ok"/>
<button name="set_pending" string="Pending" type="object" states="open" icon="gtk-media-pause"/>
<button name="set_done" string="Done" type="object" states="open,pending" icon="terp-dialog-close"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" icon="gtk-convert"/>
<button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/>
<button string="New Project Based on Template" name="duplicate_template" type="object" states="template" icon="gtk-new" context="{'parent_id':parent_id}"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" icon="gtk-convert"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' select="1" readonly="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Project" layout="auto">
<group colspan="6" col="6">
@ -320,16 +321,17 @@
<field name="arch" type="xml">
<form string="Project" layout="manual">
<div class="oe_form_topbar">
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/>
<button name="action_close" states="pending,open" string="Done" type="object" icon="terp-dialog-close"/>
<button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-media-play"/>
<button name="%(action_project_task_reevaluate)d" states="done,cancelled" string="Reactivate" type="action" icon="gtk-convert" context="{'button_reactivate':True}" />
<button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/>
<button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/>
<button name="%(action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="terp-personal"/>
<button name="action_close" states="pending,open" string="Done" type="object" icon="terp-dialog-close"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Task edition" layout="auto">
<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),
'company_id': fields.many2one('res.company', 'Company'),
'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.\
\nIf the case is in progress the state is set to \'Open\'.\
\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="type">form</field>
<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">
<field name="name"/>
<field name="project_id" required="True" on_change="on_change_project(project_id)"/>
@ -86,15 +99,6 @@
<separator string= "Description" 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_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 string="Extra Info">
<group col="4" colspan="4">
@ -113,7 +117,10 @@
</group>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>

View File

@ -10,13 +10,13 @@
<field name="project_id" position="attributes">
<attribute name="on_change">on_change_project(project_id)</attribute>
</field>
<xpath expr="/form/notebook" position="before">
<xpath expr="//notebook" position="before">
<field name="analytic_account_id"
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
on_change='on_change_account_id(analytic_account_id)'/>
</xpath>
<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}">
<tree editable="top" string="Timesheets">
<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_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"),
'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.\
\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"),

View File

@ -141,7 +141,19 @@
<field name="model">project.phase</field>
<field name="type">form</field>
<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="7" >
<field name="name" colspan="4"/>
@ -166,15 +178,6 @@
<field name="date_end"/>
</form>
</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 string="Tasks Details">
<field colspan="4" name="task_ids" readonly="1" context="{'default_project_id' :project_id}" nolabel="1">
@ -211,6 +214,7 @@
</page>
</notebook>
<newline/>
</sheet>
</form>
</field>
</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)]}),
'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),
'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'),
'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'),

View File

@ -26,8 +26,19 @@
<field name="model">report_account_analytic.planning</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Planning by Account">
<group col="6" colspan="4">
<form layout="manual">
<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="code" select="1" />
<field name="user_id" select="1" />
@ -134,18 +145,7 @@
</field>
</page>
</notebook>
<group col="6" colspan="4">
<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>
</sheet>
</form>
</field>
</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."),
'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.'),
'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 = {
'state': 'draft',
@ -229,7 +229,7 @@ class project_scrum_product_backlog(osv.osv):
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'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'),
'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."),
'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'),

View File

@ -56,8 +56,21 @@
<field name="model">project.scrum.product.backlog</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product backlog">
<group colspan="4" col="8">
<form layout="manual">
<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="project_id" select="1"/>
<field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
@ -109,15 +122,7 @@
</field>
</page>
</notebook>
<group col="8" colspan="4">
<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>
</sheet>
</form>
</field>
</record>
@ -232,8 +237,21 @@
<field name="model">project.scrum.sprint</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scrum Sprint">
<group colspan="4" col="6">
<form layout="manual">
<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="project_id" on_change="onchange_project_id(project_id)"/>
</group>
@ -298,15 +316,7 @@
<field colspan="4" name="retrospective" nolabel="1"/>
</page>
</notebook>
<group col="8" colspan="4">
<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>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -130,7 +130,23 @@
<field name="model">purchase.order</field>
<field name="type">form</field>
<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">
<field name="name"/>
<field name="date_order"/>
@ -164,18 +180,6 @@
<field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
</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 string="Delivery &amp; Invoicing">
<group colspan="2" col="2">
@ -203,7 +207,10 @@
<field colspan="4" name="notes" nolabel="1"/>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@ -506,7 +513,7 @@
<field name="inherit_id" ref="procurement.procurement_form_view"/>
<field name="type">form</field>
<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"/>
</xpath>
</field>

View File

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

View File

@ -46,7 +46,18 @@
<field name="type">form</field>
<field name="model">purchase.requisition</field>
<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">
<field name="name"/>
<field name="user_id"/>
@ -73,14 +84,6 @@
</form>
</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 string="Quotations">
<field colspan="4" name="purchase_ids" nolabel="1" mode="tree,form">
@ -109,6 +112,7 @@
<field name="description" colspan="4" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -197,7 +201,7 @@
<field name="model">procurement.order</field>
<field name="inherit_id" ref="procurement.procurement_form_view"/>
<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"/>
</xpath>
</field>

View File

@ -204,13 +204,13 @@ class sale_order(osv.osv):
'client_order_ref': fields.char('Customer Reference', size=64),
'state': fields.selection([
('draft', 'Quotation'),
('cancel', 'Cancelled'),
('waiting_date', 'Waiting Schedule'),
('manual', 'To Invoice'),
('progress', 'In Progress'),
('shipping_except', 'Shipping Exception'),
('invoice_except', 'Invoice Exception'),
('done', 'Done'),
('cancel', 'Cancelled')
], 'Order State', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True),
'date_order': fields.date('Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)]}),
'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),

View File

@ -96,23 +96,24 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>
<button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/>
<button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/>
<button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/>
<button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/>
<button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
<button name="%(report_sale_order)d" string="Print Order" type="action" icon="gtk-print" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
<button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/>
<button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
<button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
<button name="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft"/>
<button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>
<button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual"/>
<button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
<button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Sales Order" layout="auto">
<group col="6" colspan="4" class="oe_form_header">

View File

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

View File

@ -8,7 +8,7 @@
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_prod_id']" position="after">
<xpath expr="//field[@name='move_prod_id']" position="after">
<field name="sale_name"/>
<field name="sale_ref"/>
</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"),
'state': fields.selection([
('draft', 'Draft'),
('cancel', 'Cancelled'),
('auto', 'Waiting Another Operation'),
('confirmed', 'Waiting Availability'),
('assigned', 'Ready to Transfer'),
('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
* 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
@ -1632,11 +1633,12 @@ class stock_move(osv.osv):
'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}),
'note': fields.text('Notes'),
'state': fields.selection([('draft', 'New'),
('cancel', 'Cancelled'),
('waiting', 'Waiting Another Move'),
('confirmed', 'Waiting Availability'),
('assigned', 'Available'),
('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"\
"* 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"\
@ -2665,7 +2667,7 @@ class stock_inventory(osv.osv):
'date_done': fields.datetime('Date done'),
'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'),
'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)]}),
}

View File

@ -108,7 +108,19 @@
<field name="model">stock.inventory</field>
<field name="type">form</field>
<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="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -167,15 +179,8 @@
</field>
</page>
</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>
</sheet>
</form>
</field>
</record>
@ -1192,7 +1197,18 @@
<field name="type">form</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves">
<form layout="manual">
<div class="oe_form_topbar">
<button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Stock Moves" layout="auto">
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1243,15 +1259,7 @@
states="draft,waiting,confirmed,assigned"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
</group>
<separator colspan="4"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
<group col="4" colspan="2">
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/>
<button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/>
</group>
</sheet>
</form>
</field>
</record>
@ -1378,7 +1386,18 @@
<field name="type">form</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<form string="Receive Products">
<form layout="manual">
<div class="oe_form_topbar">
<button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="%(action_partial_move_server)d" string="Process" type="action" states="assigned" icon="gtk-go-forward"/>
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Receive Products" layout="auto">
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1429,15 +1448,7 @@
states="draft,waiting,confirmed,assigned,done"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
</group>
<separator colspan="4"/>
<field name="state" 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>
</sheet>
</form>
</field>
</record>

View File

@ -12,17 +12,24 @@
<field name="model">stock.period</field>
<field name="type">form</field>
<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"/>
<newline/>
<field name="date_start"/>
<field name="date_stop"/>
<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>
</sheet>
</form>
</field>
</record>
@ -78,8 +85,16 @@
<field name="model">stock.sale.forecast</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stock and Sales Forecast">
<group colspan = "4" col = "4">
<form layout="manual">
<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" >
<field name="company_id" select="1"
groups="base.group_multi_company"
@ -99,10 +114,6 @@
<field name="user_id"/>
<field name="product_amt" on_change="product_amt_change(product_amt, product_uom, product_id)" />
<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>
<separator colspan ="4" string="Sales History"/>
@ -147,6 +158,7 @@
<button name="calculate_sales_history" icon="gtk-execute"
string="Calculate Sales History" type="object" colspan = "1" states="draft" />
</group>
</sheet>
</form>
</field>
</record>

View File

@ -13,8 +13,18 @@
<field name="model">subscription.subscription</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Subscriptions">
<group col="6" colspan="4">
<form layout="manual">
<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="partner_id" select="1"/>
<field name="user_id" select="1"/>
@ -32,12 +42,6 @@
<field colspan="4" name="notes" nolabel="1"/>
<separator colspan="4"/>
<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 string="Documents created">
<field colspan="4" name="doc_lines" nolabel="1" widget="one2many_list"/>
@ -47,6 +51,7 @@
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

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

View File

@ -18,7 +18,17 @@
<field name="model">survey</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Survey">
<form layout="manual">
<div class="oe_form_topbar">
<button name="survey_open" string="Open" states="cancel,close" type="object" icon="gtk-go-forward"/>
<button name="survey_close" string="Close" states="open" type="object" icon="gtk-close"/>
<button name="survey_cancel" string="Cancel" states="open" type="object" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="open,close"/>
</div>
<div class="oe_clear"/>
</div>
<sheet string="Survey" layout="auto">
<field name="title" select="1"/>
<group col="6" colspan="6">
<field name="responsible_id"/>
@ -180,16 +190,6 @@
</field>
</form>
</field>
<group col="9" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="open,close"/>
<button name="survey_cancel"
string="Cancel" states="open" type="object" icon="gtk-cancel"/>
<button name="survey_open"
string="Open" states="cancel,close" type="object"
icon="gtk-go-forward"/>
<button name="survey_close"
string="Close" states="open" type="object" icon="gtk-close"/>
</group>
</page>
<page string="Other">
<group colspan="6" col='4'>
@ -223,6 +223,7 @@
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -1058,18 +1059,25 @@
<field name="model">survey.request</field>
<field name="type">form</field>
<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="survey_id"/>
<field name="user_id" on_change="on_change_user(user_id)"/>
<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>
</sheet>
</form>
</field>
</record>