[IMP] stock: inventory line product_qty readonly
Moves the readonly condition for the `product_qty` field into the model to have the same condition in the barcode app (enterprise). task-2123726
This commit is contained in:
@@ -341,6 +341,7 @@ class InventoryLine(models.Model):
|
||||
required=True, readonly=True)
|
||||
product_qty = fields.Float(
|
||||
'Counted Quantity',
|
||||
readonly=True, states={'confirm': [('readonly', False)]},
|
||||
digits='Product Unit of Measure', default=0)
|
||||
categ_id = fields.Many2one(related='product_id.categ_id', store=True)
|
||||
location_id = fields.Many2one(
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
<button name="action_refresh_quantity" string="Refresh quantity" title="Refresh quantity"
|
||||
icon="fa-refresh" type="object"
|
||||
attrs="{'invisible': [('outdated', '=', False)]}"/>
|
||||
<field name="product_qty" attrs="{'readonly': [('state', '!=', 'confirm')]}"
|
||||
width="0.5" string="Counted"/>
|
||||
<field name="product_qty" width="0.5" string="Counted"/>
|
||||
<field name="difference_qty" optional="show" width="0.5"/>
|
||||
<field name="product_uom_id" string="UoM" groups="uom.group_uom"
|
||||
width="0.3" force_save="1"/>
|
||||
|
||||
Reference in New Issue
Block a user