diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index d581fde2855..2a0e96f58dd 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -505,6 +505,8 @@ class ProductTemplate(models.Model): done_moves = self.env['stock.move'].search([('product_id', 'in', updated.mapped('product_variant_ids').ids)], limit=1) if done_moves: raise UserError(_("You can not change the unit of measure of a product that has already been used in a done stock move. If you need to change the unit of measure, you may deactivate this product.")) + if 'type' in vals and vals['type'] != 'product' and sum(self.mapped('nbr_reordering_rules')) != 0: + raise UserError(_('You still have some active reordering rules on this product. Please archive or delete them first.')) return super(ProductTemplate, self).write(vals) @api.multi