[FIX] repair: hide quantity when tracking via sn

Create a repair order for some product tracket by SN. User is able to
specify the quantity of items to be repaired. This is purely graphical
as the SN will determine the quantity (1) but may confuse the user

opw-2160595

closes odoo/odoo#42392

X-original-commit: 054d4bc6bc219bcc6b0a64265e8d7e9c7423dbc8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2019-12-26 11:41:20 +00:00
parent 24d296f21e
commit cf0b735ed0
+1 -1
View File
@@ -67,7 +67,7 @@
<field name="product_uom_category_id" invisible="1"/>
<label for="product_qty"/>
<div class="o_row">
<field name="product_qty"/>
<field name="product_qty" attrs="{'readonly':[('tracking', 'in', ['serial'])]}"/>
<field name="product_uom" groups="uom.group_uom"/>
</div>
<field name="lot_id" context="{'default_product_id': product_id, 'default_company_id': company_id}" groups="stock.group_production_lot" attrs="{'required':[('tracking', 'in', ['serial', 'lot'])], 'invisible': [('tracking', 'not in', ['serial', 'lot'])], 'readonly': [('state', '=', 'done')]}"/>