[IMP] product: don't allow modification of UOM's from odd views
This is to avoid users accidentally breaking inventory values.
This commit is contained in:
committed by
Antony Lesuisse
parent
9bd09bc233
commit
b7cec33182
+13
-13
@@ -369,7 +369,7 @@
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div>
|
||||
<field name="product_qty" class="oe_inline" on_change="onchange_product_tmpl_id(product_tmpl_id, product_qty, context)"/>
|
||||
<field name="product_uom" class="oe_inline" on_change="onchange_uom(product_tmpl_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" class="oe_inline" on_change="onchange_uom(product_tmpl_id, product_uom)" groups="product.group_uom"/>
|
||||
</div>
|
||||
<label for="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
|
||||
<div groups="mrp.group_mrp_routings">
|
||||
@@ -395,7 +395,7 @@
|
||||
<field name="product_id" on_change="onchange_product_id(product_id, product_qty)"/>
|
||||
<field name="type"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="product_rounding" groups="mrp.group_rounding_efficiency"/>
|
||||
<field name="product_efficiency" groups="mrp.group_rounding_efficiency"/>
|
||||
<field name="date_start"/>
|
||||
@@ -465,7 +465,7 @@
|
||||
<tree string="Bill of Materials">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="type"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="date_start"/>
|
||||
@@ -507,7 +507,7 @@
|
||||
<field name="product_qty"/>
|
||||
<field name="product_rounding"/>
|
||||
<field name="product_efficiency"/>
|
||||
<field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<field name="date_start"/>
|
||||
@@ -612,7 +612,7 @@
|
||||
<field name="date_planned"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="Total Qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="hour_total" sum="Total Hours"/>
|
||||
<field name="cycle_total" sum="Total Cycles"/>
|
||||
@@ -630,7 +630,7 @@
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="state"/>
|
||||
<templates>
|
||||
@@ -734,7 +734,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty" on_change="product_id_change(product_id, product_qty)"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<button type="action"
|
||||
name="%(mrp.action_change_production_qty)d"
|
||||
string="Update" states="confirmed" class="oe_edit_only oe_link"/>
|
||||
@@ -771,7 +771,7 @@
|
||||
<tree decoration-info="state == 'draft'" decoration-muted="state in ('cancel','done')" decoration-danger="state in ('confirmed','waiting')" string="Products to Consume">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty" string="Quantity"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<button name="%(mrp.move_consume)d"
|
||||
string="Consume Products" type="action"
|
||||
@@ -791,7 +791,7 @@
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="restrict_lot_id" context="{'product_id': product_id}" groups="stock.group_production_lot"/>
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="scrapped" invisible="1"/>
|
||||
</tree>
|
||||
@@ -806,7 +806,7 @@
|
||||
<tree string="Products to Finish">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -817,7 +817,7 @@
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field name="restrict_lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection" groups="stock.group_locations"/>
|
||||
<field name="scrapped" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
@@ -997,7 +997,7 @@
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
</group>
|
||||
@@ -1011,7 +1011,7 @@
|
||||
<tree string="Scheduled Products">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
</tree>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="type" on_change="onchange_type(type)"/>
|
||||
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
|
||||
<field name="list_price"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -94,10 +94,10 @@
|
||||
<div>
|
||||
<field name="standard_price" class="oe_inline"/>
|
||||
<label string="/" class="oe_inline" groups="product.group_uom"/>
|
||||
<field name="uom_rel_id" class="oe_inline" groups="product.group_uom"/>
|
||||
<field name="uom_rel_id" options="{'no_open':True,'no_create':True}" class="oe_inline" groups="product.group_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<field name="uom_po_id" groups="product.group_uom"/>
|
||||
<field name="uom_po_id" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Vendors"/>
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
</group>
|
||||
<group groups="product.group_uos" string="Unit of Measure">
|
||||
<field name="uos_id"/>
|
||||
<field name="uos_id" options="{'no_open':True,'no_create':True}"/>
|
||||
<field name="uos_coeff"/>
|
||||
<field name="mes_type"/>
|
||||
</group>
|
||||
@@ -408,7 +408,7 @@
|
||||
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="price" invisible="not context.get('pricelist',False)"/>
|
||||
<field name="uom_id"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="barcode"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
|
||||
+11
-11
@@ -146,7 +146,7 @@
|
||||
<tree decoration-muted="scrapped == True" string="Stock Moves">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<field name="picking_id" invisible="1" />
|
||||
<field name="create_date" invisible="1" />
|
||||
@@ -282,7 +282,7 @@
|
||||
<tree decoration-muted="state == 'cancel'" string="Moves" create="false">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_packaging" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
@@ -778,7 +778,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="availability"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="location_dest_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
@@ -1142,7 +1142,7 @@
|
||||
<field name="create_date" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
|
||||
<field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
@@ -1168,7 +1168,7 @@
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
|
||||
<field name="product_uos" groups="product.group_uos" invisible="1"/>
|
||||
<field name="location_id" invisible="1"/>
|
||||
@@ -1208,7 +1208,7 @@
|
||||
<div class="o_row">
|
||||
<field name="product_uom_qty"
|
||||
on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<button name="%(stock.move_scrap)d" class="btn-default"
|
||||
string="Scrap" type="action" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned"/> <!-- FIXME icon="terp-gtk-jump-to-ltr" -->
|
||||
@@ -1268,7 +1268,7 @@
|
||||
<label for="product_uom_qty"/>
|
||||
<div>
|
||||
<field name="product_uom_qty" on_change="onchange_quantity(product_id, product_uom_qty, product_uom, product_uos)" class="oe_inline"/>
|
||||
<field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap" type="action"
|
||||
icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
|
||||
@@ -1400,7 +1400,7 @@
|
||||
<field name="partner_id" string="Vendor"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="location_id" invisible="1"/>
|
||||
<field name="location_dest_id" invisible="1"/>
|
||||
<field name="create_date" invisible="1"/>
|
||||
@@ -1427,7 +1427,7 @@
|
||||
<field name="picking_id" string="Reference"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="date" groups="base.group_no_one"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -1652,7 +1652,7 @@
|
||||
<field name="warehouse_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
</tree>
|
||||
@@ -1693,7 +1693,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="group_id" groups="stock.group_adv_location"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
|
||||
Reference in New Issue
Block a user