mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX]make reason fields readonly if in done state
This commit is contained in:
committed by
GuillemCForgeFlow
parent
07b5dd96bf
commit
128b6112d7
@@ -6,8 +6,13 @@ from odoo import api, fields, models
|
||||
class StockInventory(models.Model):
|
||||
_inherit = "stock.inventory"
|
||||
|
||||
reason = fields.Char(help="Type in a reason for the " "product quantity change")
|
||||
preset_reason_id = fields.Many2one("stock.inventory.line.reason")
|
||||
reason = fields.Char(
|
||||
help="Type in a reason for the " "product quantity change",
|
||||
states={"done": [("readonly", True)]},
|
||||
)
|
||||
preset_reason_id = fields.Many2one(
|
||||
"stock.inventory.line.reason", states={"done": [("readonly", True)]}
|
||||
)
|
||||
|
||||
def _get_inventory_lines_values(self):
|
||||
vals = super(StockInventory, self)._get_inventory_lines_values()
|
||||
|
||||
Reference in New Issue
Block a user