From 9c06ecc2f33f449c9b8caa015c8657da3bc33bc7 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Date: Wed, 31 May 2017 13:15:15 +0200 Subject: [PATCH] restrict deletion of date.range --- stock_demand_estimate/models/stock_demand_estimate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_demand_estimate/models/stock_demand_estimate.py b/stock_demand_estimate/models/stock_demand_estimate.py index e788ebddc..a4ccf7b31 100644 --- a/stock_demand_estimate/models/stock_demand_estimate.py +++ b/stock_demand_estimate/models/stock_demand_estimate.py @@ -36,7 +36,7 @@ class StockDemandEstimate(models.Model): date_range_id = fields.Many2one( comodel_name="date.range", string="Estimating Period", - required=True) + required=True, ondelete='restrict') product_id = fields.Many2one(comodel_name="product.product", string="Product", required=True) product_uom = fields.Many2one(comodel_name="product.uom",