[IMP]purchase : added name field in analytic plan,improve string of dashboard and invoice control, make purchase line editable when analytic distribution is available, added act_window of create invoice for incoming shipment
bzr revid: mma@tinyerp.com-20120917113113-irc6taebmwqrfxys
This commit is contained in:
parent
cd644106f3
commit
ba567b3850
|
@ -263,6 +263,7 @@ class account_analytic_plan_instance_line(osv.osv):
|
|||
_name = "account.analytic.plan.instance.line"
|
||||
_description = "Analytic Instance Line"
|
||||
_columns = {
|
||||
'name': fields.char('Plan Name', size=64),
|
||||
'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, domain=[('type','<>','view')]),
|
||||
'rate': fields.float('Rate (%)', required=True),
|
||||
|
|
|
@ -112,10 +112,12 @@
|
|||
</group>
|
||||
<field name="account_ids">
|
||||
<tree string="Analytic Distribution" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</tree>
|
||||
<form string="Analytic Distribution" version="7.0">
|
||||
<field name="name"/>
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</form>
|
||||
|
@ -159,6 +161,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Analytic Distribution Line" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="rate"/>
|
||||
|
@ -172,6 +175,7 @@
|
|||
<field name="model">account.analytic.plan.instance.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Distribution Lines">
|
||||
<field name="name"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="rate"/>
|
||||
|
|
|
@ -179,7 +179,7 @@ class purchase_order(osv.osv):
|
|||
'shipped_rate': fields.function(_shipped_rate, string='Received', type='float'),
|
||||
'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been paid"),
|
||||
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
|
||||
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Bases on incoming shipments')], 'Invoicing Control', required=True,
|
||||
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True,
|
||||
help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' from where you can selectively create an invoice.\n" \
|
||||
"Based on generated invoice: create a draft invoice you can validate later.\n" \
|
||||
"Bases on incoming shipments: let you create an invoice when receptions are validated."
|
||||
|
|
|
@ -346,7 +346,7 @@
|
|||
<field name="name">Quotations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">purchase.order</field>
|
||||
<field name="context">{'search_default_draft': 1}</field>
|
||||
<field name="context">{'search_default_draft': 1, 'search_default_to_approve': 1}</field>
|
||||
<field name="domain">[('state','in',('draft','sent','confirmed'))]</field>
|
||||
<field name="view_mode">tree,form,graph,calendar</field>
|
||||
<field name="search_view_id" ref="view_purchase_order_filter"/>
|
||||
|
|
|
@ -13,5 +13,30 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="purchase_order_form_analytic_inherit">
|
||||
<field name="name">purchase.order.form.analytic.inherit</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- inherited view to make the purchase order lines list in the form non-editable
|
||||
for the members of some usability groups -->
|
||||
<record id="view_purchase_order_form_editable_list" model="ir.ui.view">
|
||||
<field name="name">purchase.order.form.editable.list</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="groups_id" eval="[(6, 0, [ref('product.group_uom'), ref('purchase.group_analytic_accounting')])]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']/tree" position="attributes">
|
||||
<attribute name="editable"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
|
||||
<record id="purchase_waiting" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Order Waiting Approval</field>
|
||||
<field name="name">Purchase Orders Waiting Approval</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">purchase.order</field>
|
||||
<field name="view_type">form</field>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<field name="inherit_id" ref="purchase.board_purchase_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/board/column/action[@string='Request for Quotations']" position="after">
|
||||
<action name="%(purchase_waiting)d" string="Purchase Order Waiting Approval"/>
|
||||
<action name="%(purchase_waiting)d" string="Purchase Orders Waiting Approval"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -30,5 +30,15 @@
|
|||
view_type="form"
|
||||
target="new"
|
||||
id="action_stock_invoice_onshipping"/>
|
||||
|
||||
<act_window name="Create invoice"
|
||||
res_model="stock.invoice.onshipping"
|
||||
src_model="stock.picking.in"
|
||||
key2="client_action_multi"
|
||||
multi="True"
|
||||
view_mode="form"
|
||||
view_type="form"
|
||||
target="new"
|
||||
id="action_stock_invoice_onshipping"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue