Skip to content
Snippets Groups Projects
Commit 5808fc89 authored by niyasraphy's avatar niyasraphy
Browse files

[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#121859

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent d4168402
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,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"/>
......
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