[FIX] repair: include mandatory group dependent uom field

The group unification done by https://github.com/odoo/odoo/pull/95729
missed adding the often mandatory `product_uom` into some views when
`uom.group_uom` is False. This is the case for repair and blocks the
user from saving its form view in this case.

X-original-commit: 72dff43a4da277b002966f5fd4045b7f9a3855ad
Part-of: odoo/odoo#104067
This commit is contained in:
Tiffany Chang (tic)
2022-10-25 16:12:04 +02:00
parent 5a79a2857f
commit ec63d36a77
+5
View File
@@ -83,6 +83,7 @@
<label for="product_qty"/>
<div class="o_row">
<field name="product_qty" attrs="{'readonly':[('tracking', '=', 'serial')]}"/>
<field name="product_uom" invisible="1" groups="!uom.group_uom"/>
<field name="product_uom" groups="uom.group_uom"/>
</div>
<field name="partner_id" widget="res_partner_many2one" attrs="{'required':[('invoice_method','!=','none')]}" context="{'res_partner_search_mode': 'customer', 'show_vat': True}"/>
@@ -118,6 +119,7 @@
<label for="product_uom_qty"/>
<div class="o_row">
<field name="product_uom_qty"/>
<field name="product_uom" invisible="1" groups="!uom.group_uom"/>
<field name="product_uom" groups="uom.group_uom"/>
</div>
<field name="price_unit"/>
@@ -148,6 +150,7 @@
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" optional="show"/>
<field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" optional="show"/>
<field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" invisible="1" groups="!uom.group_uom"/>
<field name="product_uom" string="UoM" groups="uom.group_uom" optional="show"/>
<field name="price_unit"/>
<field name="tax_id" widget="many2many_tags" optional="show"/>
@@ -179,6 +182,7 @@
<label for="product_uom_qty"/>
<div class="o_row">
<field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" invisible="1" groups="!uom.group_uom"/>
<field name="product_uom" groups="uom.group_uom"/>
</div>
<field name="price_unit"/>
@@ -193,6 +197,7 @@
<field name='name' optional="show"/>
<field name="product_uom_qty" string="Quantity"/>
<field name="product_uom_category_id" invisible="1"/>
<field name="product_uom" invisible="1" groups="!uom.group_uom"/>
<field name="product_uom" string="Unit of Measure" groups="uom.group_uom" optional="show"/>
<field name="price_unit"/>
<field name="tax_id" widget="many2many_tags" optional="show"/>