Add missing ondelete CASCADE for product, warehouse and location

review922002
This commit is contained in:
Cédric Krier committed 2013-06-26 16:46:30 +02:00
1 parent 0fabe18223
commit 6392dafc37
1 file changed
+4 -3
+4 -3
View File
@@ -17,11 +17,12 @@ class ProductLocation(ModelSQL, ModelView):
'''
__name__ = 'stock.product.location'
product = fields.Many2One('product.product', 'Product', required=True,
select=True)
select=True, ondelete='CASCADE')
warehouse = fields.Many2One('stock.location', 'Warehouse', required=True,
domain=[('type', '=', 'warehouse')])
domain=[('type', '=', 'warehouse')], ondelete='CASCADE')
location = fields.Many2One('stock.location', 'Storage Location',
required=True, domain=[
required=True, ondelete='CASCADE',
domain=[
('type', '=', 'storage'),
('parent', 'child_of', If(Bool(Eval('warehouse')),
[Eval('warehouse')], [])),