[FIX] product: allow user to set price at template creation
The lst_price field on product.template is a related to list_price. As we do not allow to set a value for related fields at creation (see orm.py , L4180), we display the list_price instead (float field). On the product.product form, we display the lst_price (function field, readonly) as we don't want to allow changing the template price from the product. opw 609497
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<group>
|
||||
<field name="type"/>
|
||||
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="list_price"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active"/>
|
||||
@@ -268,6 +268,9 @@
|
||||
<form position="attributes">
|
||||
<attribute name="string">Product Variant</attribute>
|
||||
</form>
|
||||
<field name="list_price" position="attributes">
|
||||
<attribute name="name">lst_price</attribute>
|
||||
</field>
|
||||
<field name="name" position="replace">
|
||||
<field name="name" attrs="{'invisible': [('id', '!=', False)]}"/>
|
||||
<field name="product_tmpl_id" class="oe_inline" readonly="1" attrs="{'invisible': [('id', '=', False)], 'required': [('id', '!=', False)]}"/>
|
||||
|
||||
Reference in New Issue
Block a user