[MERGE] trunk

bzr revid: fva@openerp.com-20120522093137-eqaen4t49ukcmj6f
This commit is contained in:
Frédéric van der Essen
2012-05-22 11:31:37 +02:00
100 changed files with 1309 additions and 1145 deletions
+2 -2
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. \
+36 -22
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"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid'/>
<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)]}" 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" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<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" groups="account.group_proforma_invoices"/>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<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)]}" 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" states="open,paid,proforma,sale,proforma2"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid'/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="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>
+100 -30
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"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object"/>
<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" 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" 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>
@@ -607,11 +619,29 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<<<<<<< TREE
<form string="Bank Statement">
<group col="7" colspan="4">
<field name="name"/>
<field name="date" on_change="onchange_date(date, company_id)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
=======
<form layout="manual">
<div class="oe_form_topbar">
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" />
<button name="button_dummy" states="draft" string="Compute" type="object"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object"/>
<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"/>
>>>>>>> MERGE-SOURCE
<newline/>
<field name="period_id"/>
<field name="balance_start"/>
@@ -652,13 +682,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>
@@ -668,10 +692,27 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<<<<<<< TREE
<form string="Bank Statement">
<group col="7" colspan="4">
<field name="name"/>
<field name="date" on_change="onchange_date(date, company_id)"/>
=======
<form layout="manual">
<div class="oe_form_topbar">
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" />
<button name="button_dummy" states="draft" string="Compute" type="object"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object"/>
<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)"/>
>>>>>>> MERGE-SOURCE
<field name='company_id' widget="selection" groups="base.group_multi_company" />
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<newline/>
@@ -699,12 +740,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>
@@ -1357,8 +1395,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"/>
<button name="button_cancel" states="posted" string="Cancel" type="object"/>
<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"/>
@@ -1467,13 +1514,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>
@@ -2626,6 +2669,7 @@ 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">
<<<<<<< TREE
<form string="Statement" layout="manual">
<div class="oe_form_topbar">
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object"/>
@@ -2634,10 +2678,27 @@ action = pool.get('res.config').next(cr, uid, [], context)
<div class="oe_right">
<field name="state" widget="statusbar" statusbar_visible="draft,open,confirm" nolabel="1"/>
</div>
=======
<form layout="manual">
<div class="oe_form_topbar">
<button name="button_confirm_cash" states="open" string="Close CashBox" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" type="object"/>
<button name="button_cancel" states="confirm,open" string="Cancel" 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"/>
>>>>>>> MERGE-SOURCE
</div>
<<<<<<< TREE
<sheet layout="auto">
<group col="6" colspan="4">
<field name="name"/>
=======
<sheet string="Statement" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1"/>
>>>>>>> MERGE-SOURCE
<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" domain="[('type', '=', 'cash')]"/>
<field name="user_id" select="1" readonly="1"/>
@@ -2707,6 +2768,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
</group>
<group col="2" colspan="2">
<separator string="Closing Balance" colspan="4"/>
<<<<<<< TREE
<field name="balance_end_real" readonly="1" string="Closing Cash Control"/>
<field name="balance_end" string="Theorical Cash Closing"/>
</group>
@@ -2714,9 +2776,17 @@ action = pool.get('res.config').next(cr, uid, [], context)
<separator string="Dates" colspan="4"/>
<field name="date" readonly="1"/>
<field name="closing_date" readonly="1"/>
=======
<field name="balance_end"/>
<field name="balance_end_cash"/>
>>>>>>> MERGE-SOURCE
</group>
</group>
<<<<<<< TREE
</sheet>
=======
</sheet>
>>>>>>> MERGE-SOURCE
</form>
</field>
</record>
+3 -1
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>
@@ -53,7 +53,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="accounting_report_view"/>
<field name="target">new</field>
<field name="context"></field>
<field name="context">{}</field>
<field name="context" eval="{'default_account_report_id':ref('account.account_financial_report_profitandloss0')}"/>
</record>
<menuitem icon="STOCK_PRINT" name="Profit And Loss" action="action_account_report_pl" id="menu_account_report_pl" parent="final_accounting_reports"/>
@@ -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>
+13 -10
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"/>
<button name="set_to_close" states="open" string="Set to Close" type="object"/>
<button name="set_to_draft" states="open" string="Set to Draft" type="object"/>
<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>
@@ -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>
+1 -1
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),
}
+15 -9
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" />
<button string="Approve" name="validate" states="confirm" type="workflow"/>
<button string="Done" name="done" states="validate" type="workflow" />
<button name="draft" states="cancel" string="Reset to Draft" type="workflow"/>
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
<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>
@@ -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>
@@ -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"/>
+1 -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)]}),
@@ -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" />
<button name="set_done" states="open" string="Make Payments" type="object"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object"/>
<button name="cancel" states="draft,open" string="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>
+2 -2
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. \
+18 -13
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"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record ?"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<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="//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="//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="//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="//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>
@@ -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" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" 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" 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" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" 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" 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>
@@ -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"/>
<button 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" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<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"/>
<button 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" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<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>
+1 -1
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\'. \
@@ -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>
@@ -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>
+5 -4
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 \
+82 -73
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"
/>
<button name="do_accept" string="Accept"
states="needs-action,tentative,declined"
type="object" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate" type="action"
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" />
<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"
/>
<button name="do_tentative"
states="confirmed,cancelled"
string="Uncertain"
type="object"
/>
<button name="do_cancel"
string="Cancel"
states="tentative,confirmed"
type="object"
/>
<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>
+3 -22
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 = [
@@ -224,10 +224,7 @@ class crm_base(object):
return uid
def _get_section(self, cr, uid, context=None):
"""Gives section id for current User
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
return False
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@@ -605,20 +602,4 @@ def _links_get(self, cr, uid, context=None):
res = obj.read(cr, uid, ids, ['object', 'name'], context)
return [(r['object'], r['name']) for r in res]
class users(osv.osv):
_inherit = 'res.users'
_description = "Users"
_columns = {
'context_section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def create(self, cr, uid, vals, context=None):
res = super(users, self).create(cr, uid, vals, context=context)
section_obj=self.pool.get('crm.case.section')
if vals.get('context_section_id'):
section_obj.write(cr, uid, [vals['context_section_id']], {'member_ids':[(4, res)]}, context)
return res
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -9,7 +9,7 @@
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead'}</field>
<field name="context">{'default_type':'lead', 'stage_type':'lead'}</field>
<field name="help">
&lt;img src="http://www.thaicrmsoftware.com/wp-content/uploads/2011/11/lead-conversion.jpg" align="right" style="padding: 6px" width="306" height="223"&gt;
&lt;h2&gt;Create your first OpenERP Lead &lt;/h2&gt;
@@ -66,7 +66,7 @@
<field name="res_model">crm.lead</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_new':1, 'search_default_open':1, 'search_default_section_id':section_id, 'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="context">{'search_default_new':1, 'search_default_open':1, 'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">With opportunities you can manage and keep track of your sales pipeline by creating specific customer- or prospect-related sales documents to follow up potential sales. Information such as expected revenue, opportunity stage, expected closing date, communication history and much more can be stored. Opportunities can be connected to the email gateway: new emails may create opportunities, each of them automatically gets the history of the conversation with the customer.
+18 -19
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_open" string="Open" states="draft,pending" type="object" />
<button name="case_mark_lost" string="Close" states="open,pending" type="object" />
<button name="case_pending" string="Pending" states="open" type="object" />
<button name="case_escalate" string="Escalate" states="open,pending" type="object" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" />
<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">
@@ -155,7 +156,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@@ -358,7 +359,7 @@
context="{'invisible_section': False}">
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)"/>
<filter icon="terp-personal+"
context="{'invisible_section': False}"
@@ -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_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_won" string="Mark Won" states="open,pending" type="object" />
<button name="case_open" string="Open" states="draft,pending" type="object" />
<button name="case_pending" string="Pending" states="draft,open" type="object" />
<button name="case_escalate" string="Escalate" states="open,pending" type="object" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
<button name="case_cancel" string="Cancel" states="draft" type="object" />
<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"
@@ -530,7 +529,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@@ -605,7 +604,7 @@
context="{'invisible_section': False}"
widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
context="{'invisible_section': False}"
help="My Sales Team(s)" />
<filter icon="terp-personal+"
+1 -1
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\'.\
+3 -3
View File
@@ -31,7 +31,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
@@ -67,7 +67,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_inbound_phone_tree_view"/>
<field name="domain">[]</field>
<field name="context" eval="'{\'search_default_section_id\':section_id}'"/>
<field name="context">{}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
<field name="help">This tool allows you to log your inbound calls on the fly. Each call you get will appear on the partner form to trace every contact you have with a partner. From the phone call form, you can trigger a request for another call, a meeting or an opportunity.</field>
@@ -105,7 +105,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="domain">[('state','!=','done')]</field>
<field name="context" eval="'{\'search_default_section_id\':section_id, \'default_state\':\'open\'}'"/>
<field name="context" eval="'{\'default_state\':\'open\'}'"/>
<field name="search_view_id" ref="crm.view_crm_case_scheduled_phonecalls_filter"/>
<field name="help">Scheduled calls list all the calls to be done by your sales team. A salesman can record the information about the call in the form view. This information will be stored in the partner form to trace every contact you have with a customer. You can also import a .CSV file with a list of calls to be done by your sales team.</field>
</record>
+18 -21
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" />
<button name="case_open" string="Todo" states="pending" type="object" />
<button name="case_pending" string="Not Held" states="open" type="object" />
<button name="case_reset" string="Reset to Todo" states="cancel" type="object" />
<button name="case_cancel" string="Cancel" states="open,pending" type="object" />
<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>
@@ -211,7 +208,7 @@
<field name="section_id"
widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>
@@ -261,7 +258,7 @@
<field name="section_id"
widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>
-26
View File
@@ -376,32 +376,6 @@
groups="base.group_no_one" sequence="15"
parent="base.menu_base_config" />
<record model="ir.ui.view" id="view_users_form_simple_modif_inherited1">
<field name="name">view.users.form.crm.modif.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_section_id" completion="1"
readonly="0"/>
</group>
</field>
</record>
<record id="view_users_form_simple_modif_inherited2" model="ir.ui.view">
<field name="name">view.users.form.crm.modif.inherited2</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_section_id" completion="1"/>
</group>
</field>
</record>
<!-- menu for the working time -->
<menuitem action="resource.action_resource_calendar_form" id="menu_action_resource_calendar_form" parent="resource.menu_resource_config" sequence="1"/>
+1 -1
View File
@@ -20,7 +20,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_claims_tree_view"/>
<field name="context">{'search_default_section_id': section_id,"search_default_user_id":uid, "stage_type":'claim'}</field>
<field name="context">{"search_default_user_id":uid, "stage_type":'claim'}</field>
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
<field name="help">Record and track your customers' claims. Claims may be linked to a sales order or a lot. You can send emails with attachments and keep the full history for a claim (emails sent, intervention type and so on). Claims may automatically be linked to an email address using the mail gateway module.</field>
</record>
+14 -20
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" />
<button name="case_open" string="Open" states="draft,pending" type="object" />
<button name="case_pending" string="Pending" states="draft,open" type="object" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" />
<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>
@@ -13,7 +13,7 @@
<field name="res_model">crm.fundraising</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_fundraising.crm_case_tree_view_fund"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="crm_fundraising.view_crm_case_fund_filter"/>
<field name="help">If you need to collect money for your organization or a campaign, Fund Raising allows you to track all your fund raising activities. In the search list, filter by funds description, email, history and probability of success.</field>
</record>
+17 -25
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" />
<button name="case_open" string="Open" states="draft,pending" type="object" />
<button name="case_pending" string="Pending" states="draft,open" type="object" />
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" groups="base.group_extended" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" />
<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>
@@ -234,7 +226,7 @@
</field>
<field name="section_id" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
</group>
+1 -1
View File
@@ -17,7 +17,7 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view_helpdesk"/>
<field name="search_view_id" ref="view_crm_case_helpdesk_filter"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="help">Helpdesk and Support allow you to track your interventions. Select a customer, add notes and categorize interventions with partners if necessary. You can also assign a priority level. Use the OpenERP Issues system to manage your support activities. Issues can be connected to the email gateway: new emails may create issues, each of them automatically gets the history of the conversation with the customer.</field>
</record>
+17 -27
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" />
<button name="case_open" states="draft,pending" string="Open" type="object" />
<button name="case_pending" states="draft,open" string="Pending" type="object" />
<button name="case_reset" states="done,cancel" string="Reset to Draft" type="object" />
<button name="case_escalate" states="open,draft,pending" string="Escalate" type="object" />
<button name="case_cancel" states="draft,open,pending" string="Cancel" type="object" />
<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>
@@ -232,7 +222,7 @@
<field name="user_id" widget="selection"/>
<field name="section_id" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>
+3 -3
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),
}
+29 -21
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"/>
<button string="Mark Done" name="button_done" states="confirm" type="object"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object"/>
<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" states="draft" type="object"/>
<button name="button_reg_close" string="Attended" states="open" type="object"/>
<button string="Set To Unconfirmed" name="do_draft" states="cancel,done" type="object"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object"/>
<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>
+1 -1
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"/>
+1 -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,
-9
View File
@@ -105,14 +105,5 @@ class ir_action_window(osv.osv):
ir_action_window()
class res_users(osv.osv):
_inherit = 'res.users'
_description = 'User'
_columns = {
'context_department_id': fields.many2one('hr.department', 'Departments'),
}
res_users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-22
View File
@@ -57,27 +57,5 @@
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="hr.menu_hr_configuration" sequence="5"/>
<record model="ir.ui.view" id="view_users_form_inherit">
<field name="name">res.users.form</field>
<field name="type">form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_department_id" completion="1" widget="selection" string="Department"/>
</group>
</field>
</record>
<record model="ir.ui.view" id="view_department_form_simple_modif_inherited1">
<field name="name">view.department.form.hr.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_department_id" widget="selection" readonly="0"/>
</group>
</field>
</record>
</data>
</openerp>
+14 -11
View File
@@ -106,7 +106,6 @@
<search string="Employees">
<field name="name"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" string="My Departments Employee"/>
</field>
<field name="job_id" widget="selection"/>
<field name="category_ids" select="1"/>
@@ -182,7 +181,7 @@
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[]</field>
<field name="context">{"search_default_department_id": department_id}</field>
<field name="context">{}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="help">Here you can manage your work force by creating employees and assigning them specific properties in the system. Maintain all employee related information and keep track of anything that needs to be recorded for them. The personal information tab will help you maintain their identity data. The Categories tab gives you the opportunity to assign them related employee categories depending on their position and activities within the company. A category can be a seniority level within the company or a department. The Timesheets tab allows to assign them a specific timesheet and analytic journal where they will be able to enter time through the system. In the note tab, you can enter text data that should be recorded for a specific employee.</field>
@@ -346,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"/>
<button name="job_open" string="In Position" states="old,recruit" type="object"/>
<button name="job_old" string="Mark as Old" states="open,recruit" type="object"/>
<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" />
@@ -368,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>
@@ -410,7 +414,6 @@
<separator orientation="vertical"/>
<field name="name"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+" domain="[('department_id', '=', context.get('department_id', False))]" help="My Departments Jobs"/>
</field>
<newline />
<group expand="0" string="Group By...">
@@ -428,7 +431,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_job_filter"/>
<field name="context">{"search_default_Current":1,"search_default_department_id": department_id}</field>
<field name="context">{"search_default_Current":1}</field>
<field name="help">Job Positions are used to define jobs and their requirements. You can keep track of the number of employees you have per job position and how many you expect in the future. You can also attach a survey to a job position that will be used in the recruitment process to evaluate the applicants for this job position.</field>
</record>
+1 -1
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"),
+14 -15
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"/>
<button name="button_final_validation" string="Validate Appraisal" states="wait" type="object"/>
<button name="button_done" string="Done" states="progress" type="object"/>
<button name="button_draft" string="Reset to Draft" states="cancel" type="object"/>
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"/>
<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>
+3 -2
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\'.'),
}
+14 -12
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"/>
<button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user"/>
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user"/>
<button name="invoice" states="accepted" string="Invoice" type="object" groups="base.group_hr_user"/>
<button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" 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>
@@ -148,12 +153,9 @@
<field name="employee_id"/>
<field name="date"/>
<field name="department_id" widget="selection" string="Department" context="{'invisible_department': False}">
<filter icon="terp-personal+" context="{'invisible_department': False}" domain="[('department_id','=',context.get('department_id',False))]" help="My Department"/>
</field>
<field name="name"/>
<field name="user_id" string="User">
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]"
string="Expenses of My Department"/>
</field>
</group>
<newline />
+3 -3
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
+38 -24
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"/>
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user"/>
<button string="Approved" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Set to Draft" name="set_to_draft" states="refuse,validate" type="object" 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"/>
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user"/>
<button string="Approved" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user"/>
<button string="Set to Draft" name="set_to_draft" states="cancel,validate,refuse" type="object" 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>
@@ -262,7 +276,7 @@
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="context">{"search_default_department_id": department_id}</field>
<field name="context">{}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
<field name="help">Leave requests can be recorded by employees and validated by their managers. Once a leave request is validated, it appears automatically in the agenda of the employee. You can define several allowance types (paid holidays, sickness, etc.) and manage allowances per type.</field>
@@ -295,7 +309,7 @@
<field name="name">Requests Approve</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type': 'add', 'search_default_approve':1,"search_default_department_id": department_id}</field>
<field name="context">{'default_type': 'add', 'search_default_approve':1}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
@@ -321,7 +335,7 @@
<field name="name">Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type':'add',"search_default_department_id": department_id}</field>
<field name="context">{'default_type':'add'}</field>
<field name="domain">[('type','=','add')]</field>
<field name="view_id" ref="allocation_leave_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
+28 -19
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" name="hr_verify_sheet" states="draft"/>
<button string="Refund" name="refund_sheet" states="confirm,done" type='object'/>
<button string="Set to Draft" name="draft" states="cancel"/>
<button string="Compute Sheet" name="compute_sheet" type="object" states="draft"/>
<button string="Cancel" 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" string="Close" states="draft"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" string="Generate Payslips" />
<button string="Set to Draft" 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>
+3 -3
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 = [
@@ -8,7 +8,7 @@
<field name="res_model">hr.applicant</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_filter_inprogress':1,'search_default_filter_new':1,"search_default_department_id": department_id}</field>
<field name="context">{'search_default_filter_inprogress':1,'search_default_filter_new':1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
<field name="help">From this menu you can track applicants in the recruitment process and manage all operations: meetings, interviews, phone calls, etc. If you setup the email gateway, applicants and their attached CV are created automatically when an email is sent to jobs@yourcompany.com. If you install the document management modules, all documents (CV and motivation letters) are indexed automatically, so that you can easily search through their content.</field>
</record>
@@ -76,11 +76,11 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="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="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object"/>
<button name="case_pending" string="Pending" states="open" type="object"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object"/>
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</div>
@@ -145,7 +145,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@@ -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"/>
<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>
<xpath expr="/form/sheet" position='before'>
<div class="oe_form_topbar">
<button name="set_pending" string="Pending" type="object" states="open"/>
<button name="set_close" string="Close" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close,draft"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<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>
@@ -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"/>
<button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" 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>
@@ -165,11 +170,7 @@
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="date_from"/>
<field name="department_id" widget="selection">
<filter icon="terp-personal+"
domain="[('department_id','=',context.get('department_id',False))]"
help="My Departments Timesheet"/>
</field>
<field name="department_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By...">
+2 -2
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\'.\
+13 -9
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"/>
<button name="idea_close" string="Accept" states="open"/>
<button name="idea_cancel" string="Refuse" states="open" />
<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>
@@ -898,7 +898,6 @@ class sugar_import(import_framework):
'context_lang' : 'context_lang',
'password' : 'password',
'.id' : '.id',
'context_department_id/id': self.get_users_department,
'user_email' : 'email1',
}
}
+1 -1
View File
@@ -738,7 +738,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="account.accounting_report_view"/>
<field name="target">new</field>
<field name="context"></field>
<field name="context">{}</field>
<field name="context" eval="{'default_account_report_id':ref('account_financial_report_belgiumpl0')}"/>
</record>
<menuitem icon="STOCK_PRINT" name="Profit And Loss" action="action_account_report_be_pl" id="menu_account_report_be_pl" parent="menu_finance_belgian_statement" sequence="2"/>
+11 -8
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" attrs="{'invisible':[('state','=','confirmed')]}"/>
<button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action"/>
<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>
+1 -1
View File
@@ -27,7 +27,7 @@
<field name="notification_email_pref"/>
</field>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>
@@ -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)
}
@@ -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"/>
<button name="state_done_set" string="Done" states="running"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled"/>
<button name="state_cancel_set" string="Cancel" states="running"/>
<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"/>
<button name="state_done_set" string="Close" states="running"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled"/>
<button name="state_cancel_set" string="Cancel" states="running"/>
<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"/>
<button string="Reset" states="exception,cancelled" name="button_draft" type="object"/>
<button string="Cancel" states="todo,exception" name="button_cancel" type="object"/>
<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>
+1 -1
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),
+20 -14
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"/>
<button name="button_produce" states="ready" string="Start Production"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking"/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel"/>
<button name="action_cancel" type="object" states="confirmed" string="Cancel"/>
<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"/>
+1 -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" \
+50 -47
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"/>
<button name="button_resume" string="Resume" states="pause"/>
<button name="button_done" string="Finished" states="startworking"/>
<button name="button_pause" string="Pending" states="startworking"/>
<button name="button_draft" string="Set Draft" states="cancel"/>
<button name="button_cancel" string="Cancel" states="draft,startworking"/>
<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'}"/>
+3 -3
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. \
+21 -17
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"/>
<button name="repair_ready" states="confirmed" string="Start Repair"/>
<button name="action_repair_start" states="ready" string="Start Repair"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_repair_end" states="under_repair" string="End Repair"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action"/>
<button name="cancel" states="draft" string="Cancel Repair"/>
<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>
+1 -2
View File
@@ -62,7 +62,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>
</page>
<page string="Payments">
<field name="statement_ids" colspan="4" nolabel="1">
@@ -103,7 +102,7 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
</notebook>
</sheet>
</sheet>
</form>
</field>
</record>
+1 -1
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,
+14 -9
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"/>
<button name="button_check" states="confirmed" string="Run Procurement"/>
<button name="button_restart" states="exception" string="Retry"/>
<button name="button_cancel" states="draft,exception,waiting" string="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>
+7 -14
View File
@@ -504,13 +504,6 @@ def Project():
project()
class users(osv.osv):
_inherit = 'res.users'
_columns = {
'context_project_id': fields.many2one('project.project', 'Project')
}
users()
class task(osv.osv):
_name = "project.task"
_description = "Task"
@@ -524,11 +517,11 @@ class task(osv.osv):
context key, or None if it cannot be resolved to a single project.
"""
if context is None: context = {}
if type(context.get('project_id')) in (int, long):
project_id = context['project_id']
if type(context.get('default_project_id')) in (int, long):
project_id = context['default_project_id']
return project_id
if isinstance(context.get('project_id'), basestring):
project_name = context['project_id']
if isinstance(context.get('default_project_id'), basestring):
project_name = context['default_project_id']
project_ids = self.pool.get('project.project').name_search(cr, uid, name=project_name)
if len(project_ids) == 1:
return project_ids[0][0]
@@ -678,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',
@@ -1307,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={
@@ -1342,7 +1335,7 @@ class project_task_history_cumulative(osv.osv):
id as history_id,
date+generate_series(0, CAST((coalesce(end_date,DATE 'tomorrow')::date - date)AS integer)-1) as date,
task_id, type_id, user_id, kanban_state, state,
remaining_hours, planned_hours
greatest(remaining_hours,1) as remaining_hours, greatest(planned_hours,1) as planned_hours
FROM
project_task_history
) as history
+20 -43
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_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 string="New Project Based on Template" name="duplicate_template" type="object" states="template" icon="gtk-new" context="{'parent_id':parent_id}"/>
<button name="set_done" string="Done" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="pending,cancelled,close"/>
<button name="set_pending" string="Pending" type="object" states="open"/>
<button name="set_template" string="Set as Template" type="object" states="open"/>
<button string="New Project Based on Template" name="duplicate_template" type="object" states="template" context="{'parent_id':parent_id}"/>
<button name="reset_project" string="Reset as Project" type="object" states="template"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<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">
@@ -100,7 +101,7 @@
</notebook>
<newline/>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@@ -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="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="%(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="action_close" states="pending,open" string="Done" type="object"/>
<button name="do_open" states="pending,draft" string="Start Task" type="object"/>
<button name="%(action_project_task_reevaluate)d" states="done,cancelled" string="Reactivate" type="action" context="{'button_reactivate':True}" />
<button name="do_pending" states="open" string="Pending" type="object"/>
<button name="do_draft" states="open" string="Draft" type="object"/>
<button name="%(action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object"/>
<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">
@@ -405,7 +407,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
@@ -624,7 +626,7 @@
<field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
<field eval="False" name="filter"/>
<field name="view_id" eval="False"/>
<field name="context">{"search_default_project_id": project_id}</field>
<field name="context">{}</field>
<field name="search_view_id" ref="view_task_search_form"/>
<field name="help">A task represents a work that has to be done. Each user works in his own list of tasks where he can record his task work in hours. He can work and close the task itself or delegate it to another user. If you delegate a task to another user, you get a new task in pending state, which will be reopened when you have to review the work achieved. If you install the project_timesheet module, task work can be invoiced based on the project configuration. With the project_mrp module, sales orders can create tasks automatically when they are confirmed.</field>
</record>
@@ -745,31 +747,6 @@
</record>
<!-- User Form-->
<record id="view_project_users_form_simple" model="ir.ui.view">
<field name="name">res.users.project.form1</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_project_id"/>
</group>
</field>
</record>
<record model="ir.ui.view" id="view_users_form_project_modif_inherited1">
<field name="name">view.users.form.project.modif.inherited1</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="type">form</field>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<group name="default_filters" position="inside">
<field name="context_project_id" context="{'user_preference':True}" widget="selection" readonly="0"/>
</group>
</field>
</record>
<act_window context="{'search_default_user_id': [active_id], 'default_user_id': active_id}" domain="[('state', '&lt;&gt;', 'cancelled'),('state', '&lt;&gt;', 'done')]" id="act_res_users_2_project_task_opened" name="Assigned Tasks" res_model="project.task" src_model="res.users" view_mode="tree,form,gantt,calendar,graph" view_type="form"/>
<act_window context="{'search_default_user_id': [active_id], 'default_user_id': active_id}" domain="[('state', '&lt;&gt;', 'cancelled'),('state', '&lt;&gt;', 'done')]" id="act_res_users_2_project_task_opened" name="Assigned Tasks" res_model="project.task" src_model="res.users" view_mode="tree,form,gantt,calendar,graph" view_type="form"/>
</data>
</openerp>
+161 -135
View File
@@ -1,42 +1,50 @@
.project_fields {
margin-top: 1px;
margin-bottom: 1px;
font-size: 11px;
padding-left: 0px;
}
margin-top: 1px;
margin-bottom: 1px;
font-size: 11px;
padding-left: 0px;
}
.project_fields td {
border: none;
padding: 2px 0 2px 8px; }
padding: 2px 0 2px 8px;
}
.project_fields th {
padding: 0;
border-right: 1px solid #dddddd;
vertical-align: top;
margin-right: 8px; }
margin-right: 8px;
}
.project_vignettes{
padding: 4px !important }
.project_vignettes li {
padding: 4px !important;
}
.project_vignettes li {
float: left;
}
.project_vignettes .project_avatar {
}
.project_vignettes .project_avatar {
width: 30px;
height: 30px;
padding-left: 0px; }
.project_vignettes .project_fields {
width: 100%; }
.project_vignettes .project_fields th {
width: 120px;
font-weight: normal; }
.project_vignettes .project_fields td {
color: #888888; }
.project_vignettes h4 a {
color: #4c4c4c; }
.project_vignettes > li h4 {
padding-left: 0px;
}
.project_vignettes .project_fields {
width: 100%;
}
.project_vignettes .project_fields th {
width: 120px;
font-weight: normal;
}
.project_vignettes .project_fields td {
color: #888888;
}
.project_vignettes h4 a {
color: #4c4c4c;
}
.project_vignettes > li h4 {
margin-bottom: 2px;
padding-left: 2px; }
padding-left: 2px;
}
.oe_project_buttons {
padding: 2px 2px !important;
background: none !important;
background: none !important;
background-color: transparent !important;
border: hidden !important;
color: #8A89BA !important;
@@ -51,8 +59,8 @@
border-radius: 4px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.click_button {
background: none !important;
background-color: transparent !important;
@@ -68,54 +76,60 @@
-webkit-box-align: baseline;
}
.click_button:hover {
cursor: default !important;
}
.dropdown-menu {
display: none;
position: absolute; }
display: none;
position: absolute;
}
.dropdown {
position: relative; }
position: relative;
}
.dropdown-toggle:after {
width: 0;
height: 0;
display: inline-block;
content: "&darr";
text-indent: -99999px;
vertical-align: top;
margin-top: 8px;
margin-left: 4px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid white;
filter: alpha(opacity=50);
-khtml-opacity: 0.5;
-moz-opacity: 0.5;
opacity: 0.5; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px; }
width: 0;
height: 0;
display: inline-block;
content: "&darr";
text-indent: -99999px;
vertical-align: top;
margin-top: 8px;
margin-left: 4px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid white;
filter: alpha(opacity=50);
-khtml-opacity: 0.5;
-moz-opacity: 0.5;
opacity: 0.5;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px;
}
a.oe_project_kanban_action {
position: absolute;
right: 0;
display: none;
}
a.oe_project_kanban_action:hover {
text-decoration: none; }
a.oe_project_kanban_action .oe_i {
color: #4c4c4c; }
.square {
display: inline-block;
width: 18px;
height: 18px;
border:1px solid grey;
}
position: absolute;
right: 0;
display: none;
}
a.oe_project_kanban_action:hover {
text-decoration: none;
}
a.oe_project_kanban_action .oe_i {
color: #4c4c4c;
}
.square {
display: inline-block;
width: 18px;
height: 18px;
border:1px solid grey;
}
.oe_kanban_color_0 {
background: white;
}
@@ -136,85 +150,97 @@ a.oe_project_kanban_action {
}
.open {
display: block;
}
.open .dropdown-menu {
display: block; }
display: block;
}
.open .dropdown-menu {
display: block;
}
a.oe_project_kanban_action {
position: absolute;
right: 0;
}
a.oe_project_kanban_action:hover {
position: absolute;
right: 0;
}
a.oe_project_kanban_action:hover {
text-decoration: none;
}
a.oe_project_kanban_action .eo_i {
color: #4c4c4c; }
}
a.oe_project_kanban_action .eo_i {
color: #4c4c4c;
}
.oe_project_kanban_vignette {
position: relative;
min-height: 50px;
/*background: white;*/
border: 1px solid #d8d8d8;
border-bottom-color: #b9b9b9;
padding: 6px;
margin: 6px 0;
display: inline-block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
position: relative;
min-height: 50px;
/*background: white;*/
border: 1px solid #d8d8d8;
border-bottom-color: #b9b9b9;
padding: 6px;
margin: 6px 0;
display: inline-block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.oe_project_kanban_vignette:last-child {
margin-bottom: 0; }
.oe_project_kanban_vignette:hover {
.oe_project_kanban_vignette:last-child {
margin-bottom: 0;
}
.oe_project_kanban_vignette:hover {
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); }
.oe_project_kanban_vignette h4 {
margin: 0 0 2px; }
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
.oe_project_kanban_vignette h4 {
margin: 0 0 2px;
}
.oe_project_kanban_vignette .dropdown-menu {
top: 30px;
right: -140px;
padding: 4px;
border: 1px solid #afafb6;
width: 160px;
overflow-x: hidden;
z-index: 900;
background: white;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.oe_project_kanban_vignette .dropdown-menu p {
margin-left: 12px; }
.oe_project_kanban_vignette .dropdown-menu li {
top: 30px;
right: -140px;
padding: 4px;
border: 1px solid #afafb6;
width: 160px;
overflow-x: hidden;
z-index: 900;
background: white;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.oe_project_kanban_vignette .dropdown-menu p {
margin-left: 12px;
}
.oe_project_kanban_vignette .dropdown-menu li {
float: none;
display: block;
background-color: none; }
.oe_project_kanban_vignette .dropdown-menu li a {
display: block;
padding: 3px 6px;
clear: both;
font-weight: normal;
line-height: 14px;
color: #4c4c4c;
text-decoration: none; }
.oe_project_kanban_vignette .dropdown-menu li a:hover {
background: #f0f0fa;
background: -moz-linear-gradient(#f0f0fa, #eeeef6);
background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background: -webkit-linear-gradient(#f0f0fa, #eeeef6);
-moz-box-shadow: none;
-webkit-box-shadow: none;
-box-shadow: none; }
background-color: none;
}
.oe_project_kanban_vignette .dropdown-menu li a {
display: block;
padding: 3px 6px;
clear: both;
font-weight: normal;
line-height: 14px;
color: #4c4c4c;
text-decoration: none;
}
.oe_project_kanban_vignette .dropdown-menu li a:hover {
background: #f0f0fa;
background: -moz-linear-gradient(#f0f0fa, #eeeef6);
background: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background: -webkit-linear-gradient(#f0f0fa, #eeeef6);
-moz-box-shadow: none;
-webkit-box-shadow: none;
-box-shadow: none;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser {
padding: 0 3px; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left; }
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px; }
padding: 0 3px;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li {
float: left;
}
.oe_project_kanban_vignette .dropdown-menu .color-chooser li a {
padding: 2px;
}
+18 -19
View File
@@ -3,31 +3,30 @@ openerp.project = function(openerp) {
bind_events: function() {
var self = this;
self._super();
if(this.view.dataset.model == 'project.project') {
if (this.view.dataset.model == 'project.project') {
/*set avatar title for members.
In many2many fields, returns only list of ids.
we can implement return value of m2m fields like [(1,"Adminstration"),...].
*/
_.each($(this.$element).find('.project_avatar'),function(avatar){
_.each($(this.$element).find('.project_avatar'), function(avatar) {
var dataset = new openerp.web.DataSetSearch(this, 'res.users', self.session.context, [['id','=',avatar.id]]);
dataset.read_slice(['name']).then(function(result){
avatar.setAttribute("title",result[0].name)
dataset.read_slice(['name']).then(function(result) {
avatar.setAttribute("title",result[0].name);
});
});
});
// set sequence like Tasks,Issues,Timesheets and Phases
var my_list = $("#list a")
var my_list = $("#list a");
my_list.sort(function (a, b) {
var aValue = parseInt(a.id);
var bValue = parseInt(b.id);
var aValue = parseInt(a.id, 10);
var bValue = parseInt(b.id, 10);
return aValue == bValue ? 0 : aValue < bValue ? -1 : 1;
});
});
$('#list').replaceWith(my_list);
// when vignette is clicked, it opens the first action in sequence
if (my_list.length != 0) {
var click_button = $(this.$element).find('.click_button')
if (my_list.length !== 0) {
var click_button = $(this.$element).find('.click_button');
click_button.attr('data-name', my_list[0].getAttribute('data-name'));
click_button.attr('data-type', "action");
}
@@ -36,13 +35,13 @@ openerp.project = function(openerp) {
we can do other way to implement new widget.
because we need to rpc call for that.
*/
this.$element.find('.bgcolor').click(function(){
var color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16))
var color_class = $(this).find('span').attr('class').split(' ')[0]
this.$element.find('.bgcolor').click(function() {
var color = parseInt($(this).find('span').attr('class').split(' ')[0].substring(16), 10);
var color_class = $(this).find('span').attr('class').split(' ')[0];
$(this).closest('#oe_project_kanban_vignette').removeClass().addClass(color_class + ' oe_project_kanban_vignette');
self.view.dataset.write(parseInt(this.id), {color:color});
self.view.dataset.write(parseInt(this.id, 10), {color:color});
});
}
}
});
}
};
+1 -8
View File
@@ -140,12 +140,6 @@ class project_issue(crm.crm_case, osv.osv):
res[issue.id] = {'progress' : progress}
return res
def _get_project(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.context_project_id:
return user.context_project_id.id
return False
def on_change_project(self, cr, uid, ids, project_id, context=None):
return {}
@@ -179,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\'.\
@@ -233,7 +227,6 @@ class project_issue(crm.crm_case, osv.osv):
'section_id': crm.crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'project_id':_get_project,
'categ_id' : lambda *a: False,
}
+1 -1
View File
@@ -12,7 +12,7 @@
<field name="view_mode">kanban,tree,calendar</field>
<field name="view_id" eval="False"/>
<field name="domain" eval=""/>
<field name="context">{"search_default_user_id": uid, "search_default_draft": 1,"search_default_todo": 1,"search_default_project_id":project_id}</field>
<field name="context">{"search_default_user_id": uid, "search_default_draft": 1,"search_default_todo": 1}</field>
<field name="search_view_id" ref="view_project_issue_filter"/>
<field name="help">Issues such as system bugs, customer complaints, and material breakdowns are collected here. You can define the stages assigned when solving the project issue (analysis, development, done). With the mailgateway module, issues can be integrated through an email address (example: support@mycompany.com)</field>
</record>
+17 -10
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"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object"/>
<button name="case_pending" string="Pending" states="draft,open" type="object"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object"/>
<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>
@@ -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"/>
@@ -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"),
@@ -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"/>
<button string="Done" name="set_done" states="pending,open"/>
<button string="Pending" name="set_pending" states="open"/>
<button string="Draft" name="set_draft" states="open"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending"/>
<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>
+1 -1
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'),
@@ -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" />
<button name="action_done" states="open" string="Done" type="object" />
<button name="action_draft" states="done,cancel" string="Reset to Draft" type="object" />
<button name="action_cancel" states="draft,open" string="Cancel" 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="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>
+2 -2
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'),
+32 -22
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"/>
<button type="object" string="Close" name="button_close" states="open,pending"/>
<button type="object" string="Pending" name="button_pending" states="open"/>
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done"/>
<button type="object" string="Cancel" name="button_cancel" states="draft,open,pending"/>
<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"/>
<button type="object" string="Close" name="button_close" states="open,pending"/>
<button type="object" string="Pending" name="button_pending" states="open"/>
<button name="%(project_scrum.report_scrum_sprint_burndown_chart)d"
string="Burndown Chart" type="action"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done"/>
<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>
+1 -1
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 = {
+21 -14
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"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
<button name="purchase_confirm" states="draft" string="Confirm Purchase"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase"/>
<button name="purchase_approve" states="confirmed" string="Approved"/>
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel" type="object"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="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>
+1 -1
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>
@@ -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" />
<button name="tender_reset" states="done,cancel" string="Reset to Draft" type="object" />
<button name="tender_done" states="in_progress" string="Done" type="object" />
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" />
<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>
+1 -1
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."),
+16 -15
View File
@@ -96,23 +96,24 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<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="order_confirm" states="draft" string="Confirm Order"/>
<button name="manual_invoice" states="manual" string="Create Final Invoice" type="object"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Ignore Exception"/>
<button name="ship_recreate" states="shipping_except" string="Recreate Packing"/>
<button name="ship_corrected" states="shipping_except" string="Ignore Exception"/>
<button name="%(report_sale_order)d" string="Print Order" type="action" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
<button name="ship_cancel" states="shipping_except" string="Cancel Order"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="invoice_cancel" states="invoice_except" string="Cancel Order"/>
<button name="%(report_sale_order)d" string="Print Quotation" type="action" states="draft"/>
<button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" states="draft,manual"/>
<button name="action_cancel" states="manual,progress" string="Cancel Order" type="object"/>
<button name="cancel" states="draft" string="Cancel Order"/>
<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">
@@ -265,7 +266,7 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
+1 -1
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>
+1 -1
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>
+5 -3
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)]}),
}
+57 -46
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"/>
<button name="action_done" states="confirm" string="Validate Inventory" type="object"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object"/>
<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>
@@ -705,14 +710,14 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="draft_force_assign" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="draft_validate" states="draft" string="Confirm &amp; Transfer" type="object" icon="gtk-media-play"/>
<!-- <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> -->
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="action_process" states="assigned" string="Confirm &amp; Transfer" groups="stock.group_stock_user" type="object" icon="gtk-go-forward"/>
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" />
<button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" icon="terp-gtk-go-back-rtl" />
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
<button name="draft_force_assign" states="draft" string="Confirm" type="object"/>
<button name="draft_validate" states="draft" string="Confirm &amp; Transfer" type="object"/>
<!-- <button name="action_assign" states="confirmed" string="Check Availability" type="object"/> -->
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
<button name="action_process" states="assigned" string="Confirm &amp; Transfer" groups="stock.group_stock_user" type="object"/>
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" />
<button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" />
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
</div>
@@ -925,12 +930,12 @@
<field name="arch" type="xml">
<data>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='%(act_stock_return_picking)d']" position="replace">
<button name="%(report_picking_list_out)d" string="Print Delivery Slip" type="action" icon="gtk-print" states="done"/>
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="terp-gtk-go-back-rtl" />
<button name="%(report_picking_list_out)d" string="Print Delivery Slip" type="action" states="done"/>
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" />
</xpath>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='draft_validate']" position="replace">
<button name="draft_validate" states="draft" string="Confirm &amp; Deliver" type="object" icon="gtk-media-play"/>
<button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/>
<button name="draft_validate" states="draft" string="Confirm &amp; Deliver" type="object"/>
<button name="action_assign" states="confirmed" string="Check Availability" type="object"/>
</xpath>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='action_process']" position="replace">
<button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward"/>
@@ -942,7 +947,7 @@
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4" string="Customer"/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>
@@ -1046,19 +1051,19 @@
<field name="arch" type="xml">
<data>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='%(act_stock_return_picking)d']" position="replace">
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="terp-gtk-go-back-rtl" />
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" />
</xpath>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='draft_validate']" position="replace">
<button name="draft_validate" states="draft" string="Confirm &amp; Receive" type="object" icon="gtk-media-play"/>
<button name="draft_validate" states="draft" string="Confirm &amp; Receive" type="object"/>
</xpath>
<xpath expr="/form/div[@class='oe_form_topbar']/button[@name='action_process']" position="replace">
<button name="action_process" states="assigned" string="Receive" type="object" icon="gtk-go-forward"/>
<button name="action_process" states="assigned" string="Receive" type="object"/>
</xpath>
<xpath expr="/form/sheet/group/group/field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4" string="Supplier"/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_sheet_width">
<div class="oe_form_bottom">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</xpath>
@@ -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"/>
<button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object"/>
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object"/>
<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"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object"/>
<button name="%(action_partial_move_server)d" string="Process" type="action" states="assigned"/>
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object"/>
<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>
+23 -11
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" states="draft" type="object"/>
<button name="button_close" string="Close" 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" 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>
+13 -8
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"/>
<button name="set_done" states="running" string="Stop" type="object"/>
<button name="set_draft" states="done" string="Set to Draft" type="object"/>
<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>
+2 -2
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',
+26 -18
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"/>
<button name="survey_close" string="Close" states="open" type="object"/>
<button name="survey_cancel" string="Cancel" states="open" type="object"/>
<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"/>
<button name="survey_req_waiting_answer" string="Waiting Answer" states="draft" type="object"/>
<button name="survey_req_done" string="Done" states="waiting_answer" type="object"/>
<button name="survey_req_cancel" string="Cancel" states="waiting_answer" type="object"/>
<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>