Skip to content
Snippets Groups Projects
Commit 9c02bc50 authored by niyasraphy's avatar niyasraphy Committed by William Henrotin
Browse files

[FIX] mrp_subcontracting: show lot field only when lot/serial number is activated


before this commit the lot field is visible even without activating the
lot and serial number feature from the settings.

after this commit the field will be visible only when the feature is
activated in the settings.

closes odoo/odoo#113030

X-original-commit: fb0940d6
Related: odoo/enterprise#37251
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent ce5045d4
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
<!-- Don't put move_id here to avoid that the framework send falsy move_id -->
<field name="id" invisible="1"/>
<field name="product_id" required="1" domain="[('id', 'in', context.get('bom_product_ids'))] if context.get('is_subcontracting_portal') else []"/>
<field name="lot_id"
<field name="lot_id" groups="stock.group_production_lot"
attrs="{'invisible': [('tracking', 'not in', ('serial', 'lot'))], 'required': [('tracking', 'in', ('serial', 'lot'))]}"
context="{'default_product_id': product_id, 'default_company_id': company_id}"/>
<field name="reserved_uom_qty" readonly="1" force_save="1"/>
......@@ -121,7 +121,7 @@
<field name="location_dest_id" invisible="1"/>
<field name="product_id" readonly="1" force_save="1"/>
<field name="qty_done"/>
<field name="lot_id" attrs="{'column_invisible':[('parent.has_tracking', 'not in', ('serial', 'lot'))], 'required': [('tracking', 'in', ('serial', 'lot'))]}" context="{'default_product_id': product_id, 'default_company_id': company_id}"/>
<field name="lot_id" attrs="{'column_invisible':[('parent.has_tracking', 'not in', ('serial', 'lot'))], 'required': [('tracking', 'in', ('serial', 'lot'))]}" context="{'default_product_id': product_id, 'default_company_id': company_id}" groups="stock.group_production_lot"/>
</tree>
</field>
</sheet>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment