[IMP] mrp: add default company id

Add a default_company_id on fields `lot_id` to make use more convenient.
This commit is contained in:
svs-odoo
2019-09-04 11:08:39 +00:00
parent d4a866e90d
commit f04141093c
+2 -2
View File
@@ -162,7 +162,7 @@
<field name="product_id"/>
<field name="product_tracking" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_product_id': product_id, 'active_mo_id': parent.production_id}"/>
<field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_company_id': company_id, 'default_product_id': product_id, 'active_mo_id': parent.production_id}"/>
<field name="qty_to_consume" readonly="1"/>
<field name="qty_reserved" readonly="1"/>
<field name="qty_done" attrs="{'column_invisible': [('parent.state', 'not in', ('progress', 'done'))]}"/>
@@ -176,7 +176,7 @@
<field name="product_id"/>
<field name="product_tracking" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_product_id': product_id}"/>
<field name="lot_id" attrs="{'readonly': [('product_tracking', '=', 'none')]}" context="{'default_company_id': company_id, 'default_product_id': product_id}"/>
<field name="qty_to_consume" readonly="1" string="To Produce"/>
<field name="qty_done" string="Produced"/>
<field name="product_uom_id" invisible="1"/>