diff options
| author | Antoine Prieels <anp@odoo.com> | 2019-02-11 11:20:43 +0000 |
|---|---|---|
| committer | Antoine Prieels <anp@odoo.com> | 2019-03-06 06:45:13 +0000 |
| commit | 8a7b6a4f9c2ab2e8d208e735f86b0c9477a2ca64 (patch) | |
| tree | c199322e4610fedd946f979446fa8678d51ec597 /addons/repair/views | |
| parent | e48040677382a378a7bdb2d755d0ff23e19c82ab (diff) | |
[IMP] repair: Hide lot_id and do not systematically reset lot_id
- Hide lot_id field when product is not tracked
- There was an onchange on the product_id that systematically set the lot_id to `False`.
When giving default values for the lot_id and product_id through the context,
the default value of the lot_id would be overwriten by the onchange.
To fix this, we only reset the lot_id when it is inconsistent with the product_id.
TaskId: 1909413
Diffstat (limited to 'addons/repair/views')
| -rw-r--r-- | addons/repair/views/repair_views.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/repair/views/repair_views.xml b/addons/repair/views/repair_views.xml index 30b6f7a369c..f96f4e472c2 100644 --- a/addons/repair/views/repair_views.xml +++ b/addons/repair/views/repair_views.xml @@ -58,7 +58,7 @@ <field name="product_qty"/> <field name="product_uom" groups="uom.group_uom"/> </div> - <field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot" attrs="{'required': [('tracking', '!=', 'none')], 'readonly': [('state', '=', 'done')]}"/> + <field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot" attrs="{'required':[('tracking', 'in', ['serial', 'lot'])], 'invisible': [('tracking', 'not in', ['serial', 'lot'])], 'readonly': [('state', '=', 'done')]}"/> <field name="partner_id" widget="res_partner_many2one" attrs="{'required':[('invoice_method','!=','none')]}" context="{'show_vat': True}"/> <field name="address_id" groups="sale.group_delivery_invoice_address"/> </group> |
