[IMP] sale, sale_analytic_plans: add missing fields in sale order lines, and make list non-editable for group analytic accounting

bzr revid: rco@openerp.com-20120831095400-gaztg6293sz43pd1
This commit is contained in:
Raphael Collet 2012-08-31 11:54:00 +02:00
parent bce4d99a27
commit a652cc9ef0
2 changed files with 7 additions and 2 deletions

View File

@ -262,8 +262,6 @@
<field name="sequence" widget="handle"/>
<field name="state" invisible="1"/>
<field name="delay" invisible="1"/>
<field name="tax_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="th_weight" invisible="1"/>
<field name="product_packaging" invisible="1"/>
<field name="product_id"
@ -271,6 +269,7 @@
groups="base.group_user"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
<field name="name"/>
<field name="type"/>
<field name="product_uom_qty"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
@ -281,6 +280,7 @@
<field name="product_uos" string="UoS" groups="product.group_uos"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="price_unit"/>
<field name="tax_id"/>
<field name="price_subtotal"/>
</tree>
</field>

View File

@ -22,6 +22,11 @@
</field>
</record>
<!-- the presence of 'analytics_id' makes the order lines non-editable -->
<record id="sale.view_order_form_editable_list" model="ir.ui.view">
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
</record>
<record model="ir.ui.view" id="view_order_line_form2_inherit">
<field name="name">sale.order.line.form2.inherit</field>
<field name="model">sale.order.line</field>