diff --git a/CHANGELOG b/CHANGELOG index 82c4f3fc6b..c05067019b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,2 +1,4 @@ +* Allow only fixed cost price as method for kit + Version 6.0.0 - 2021-05-03 * Initial release diff --git a/product.py b/product.py index ab6f46a16c..743122cd1c 100644 --- a/product.py +++ b/product.py @@ -21,6 +21,12 @@ class Template(metaclass=PoolMeta): super().__setup__() cls.type.selection.append(('kit', "Kit")) + @classmethod + def _cost_price_method_domain_per_type(cls): + types_cost_method = super()._cost_price_method_domain_per_type() + types_cost_method['kit'] = [('cost_price_method', '=', 'fixed')] + return types_cost_method + @fields.depends('type', 'cost_price_method') def on_change_type(self): super().on_change_type()