mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_secondary_unit: Make readonly secondary qty field in some states
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_qty" position="before">
|
||||
<field name="secondary_uom_qty" />
|
||||
<field
|
||||
name="secondary_uom_qty"
|
||||
attrs="{'readonly': [('state', 'in', ('done', 'cancel')), ('is_locked', '=', True)]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="['|', ('product_id', '=', product_id),
|
||||
@@ -31,7 +35,11 @@
|
||||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_qty" position="before">
|
||||
<field name="secondary_uom_qty" />
|
||||
<field
|
||||
name="secondary_uom_qty"
|
||||
attrs="{'readonly': [('state', 'in', ('done', 'cancel')), ('is_locked', '=', True)]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="['|', ('product_id', '=', product_id),
|
||||
|
||||
Reference in New Issue
Block a user