[FIX] mrp: clear product variant onchanging product in bom
before this commit, on changing the product from bom is not clearing the product variant field, if the product variant feature is not activated in the database. * activate the product variant in the db * create a product and variants * open bill of material, and set the created product as product and set any variant in product variant field * now go to settings and disable product variant feature * come back to same bom and change the product * the product variant field will still have the other product onchange_product_tmpl_id is written to clear the product variant field value, but as the product variant field has group the onchange value is not getting updated. after this commit, on changing the product the product variant field will get cleared even if the product variant feature is not activated. closes odoo/odoo#122681 X-original-commit: 5808fc898ecbbf23d93693f7d957a6700de144c6 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="allow_operation_dependencies" invisible="1"/>
|
||||
<field name="product_id" groups="product.group_product_variant" context="{'default_detailed_type': 'product'}"/>
|
||||
<field name="product_id" groups="!product.group_product_variant" invisible="1"/>
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
|
||||
Reference in New Issue
Block a user