[FIX] mrp_workorder quality: product and template desynchronized

Issue : When selecting mrp_operation as picking_type, the product
variant is not changed

Steps to reproduce:

Install Quality, MRP
Disable variants
Edit View: Form (debug mode) and remove
groups="product.group_product_variant" to show the variants
(This is done so we can see the issue in the backend)
Set a product
Changing product changes the variant
Set the operation to manufacturing
Set another product
-> The variant is not updated
Why is that a bug:
It can lead to some problems if the variants are disabled and then
enabled at a later time for the company

Side-Note:
The original bug related to the related commit was not present in
v13 as said in the related commit opw discussion

Related commit 2dc2003
opw-2515100 (related to opw-2490412)

closes odoo/odoo#76707

X-original-commit: 441fb1e9ee97e2dcc1c2bd1a9fdb393d006aa1a5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
This commit is contained in:
Nathan Marotte (nama)
2021-09-20 08:13:02 +00:00
parent 804e83d771
commit 9bdb206096
+1 -1
View File
@@ -55,7 +55,7 @@
</div>
</group>
<group>
<field name="lot_id" attrs="{'invisible': ['|',('product_id', '=', False),('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}" groups="stock.group_production_lot"/>
<field name="lot_id" context="{'default_product_id': product_id, 'default_company_id': company_id}" attrs="{'invisible': ['|',('product_id', '=', False),('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}" groups="stock.group_production_lot"/>
<field name="tracking" invisible="1"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>