From d82779684db3d74060faf21ca0d32b1bb1b9e85b Mon Sep 17 00:00:00 2001 From: Paul Catinean Date: Wed, 4 Jun 2014 22:17:02 +0200 Subject: [PATCH] [FIX] Added cascade on subproduct so they get removed once the parent boms are removed --- addons/mrp_byproduct/mrp_byproduct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_byproduct/mrp_byproduct.py b/addons/mrp_byproduct/mrp_byproduct.py index 91ea997a2e4..fc6069fc8ad 100644 --- a/addons/mrp_byproduct/mrp_byproduct.py +++ b/addons/mrp_byproduct/mrp_byproduct.py @@ -35,7 +35,7 @@ class mrp_subproduct(osv.osv): 'Fixed' depicts a situation where the quantity of created byproduct is always equal to the quantity set on the BoM, regardless of how many are created in the production order.\ By opposition, 'Variable' means that the quantity will be computed as\ '(quantity of byproduct set on the BoM / quantity of manufactured product set on the BoM * quantity of manufactured product in the production order.)'"), - 'bom_id': fields.many2one('mrp.bom', 'BoM'), + 'bom_id': fields.many2one('mrp.bom', 'BoM', ondelete='cascade'), } _defaults={ 'subproduct_type': 'variable',