From 8eff4a3af825e692cc0fc6a63deedf4d304d751d Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 22 Jan 2014 14:27:30 +0100 Subject: [PATCH] [FIX]inventory adjustment: move_ids should be readonly once inventory has been validated lp bug: https://launchpad.net/bugs/1271262 fixed bzr revid: csn@openerp.com-20140122132730-x0oiddxio1nkiwo3 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 66e40e8df5b..2896bed07ee 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2019,7 +2019,7 @@ class stock_inventory(osv.osv): 'date_done': fields.datetime('Date done', help="Inventory Validation Date."), 'line_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, states={'done': [('readonly', True)]}, help="Inventory Lines."), 'line_view_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, domain=['|',('th_qty', '>=', 0),('th_qty', '=', False)], states={'done': [('readonly', True)]}, help="Inventory Lines."), - 'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves', help="Inventory Moves."), + 'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves', help="Inventory Moves.", states={'done': [('readonly', True)]}), 'state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('confirm', 'In Progress'), ('done', 'Validated')], 'Status', readonly=True, select=True), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft': [('readonly', False)]}), 'location_id': fields.many2one('stock.location', 'Location', required=True, readonly=True, states={'draft': [('readonly', False)]}),