[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:
svs-odoo
2020-03-05 13:32:57 +00:00
parent d2dbb0da2e
commit 339c40abe1
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -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(
+1 -2
View File
@@ -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"/>