[FIX] stock: prevent deleting lot linked to existing quant

Fixes #4458
This commit is contained in:
Rucha Dave 2015-01-05 18:57:56 +05:30 committed by Martin Trigaux
parent 46ad2ac70f
commit cb3034bdb0
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ class stock_quant(osv.osv):
'package_id': fields.many2one('stock.quant.package', string='Package', help="The package containing this quant", readonly=True, select=True),
'packaging_type_id': fields.related('package_id', 'packaging_id', type='many2one', relation='product.packaging', string='Type of packaging', readonly=True, store=True),
'reservation_id': fields.many2one('stock.move', 'Reserved for Move', help="The move the quant is reserved for", readonly=True, select=True),
'lot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True, select=True),
'lot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True, select=True, ondelete="restrict"),
'cost': fields.float('Unit Cost'),
'owner_id': fields.many2one('res.partner', 'Owner', help="This is the owner of the quant", readonly=True, select=True),