diff --git a/issue3209.diff b/issue3209.diff new file mode 100644 index 0000000..b420538 --- /dev/null +++ b/issue3209.diff @@ -0,0 +1,35 @@ +diff --git a/trytond/trytond/modules/production/production.py b/trytond/trytond/modules/production/production.py +index acd7a35..1ccc421 100644 +--- a/trytond/trytond/modules/production/production.py ++++ b/trytond/trytond/modules/production/production.py +@@ -468,12 +468,6 @@ class Production(Workflow, ModelSQL, ModelView): + moves.append(output) + Move.save(moves) + +- @classmethod +- def validate(cls, productions): +- super(Production, cls).validate(productions) +- for production in productions: +- production.check_cost() +- + @property + def output_cost(self): + cost_price = Decimal(0) +@@ -481,17 +475,6 @@ class Production(Workflow, ModelSQL, ModelView): + cost_price += (Decimal(str(output.quantity)) * output.unit_price) + return cost_price + +- def check_cost(self): +- if self.state != 'done': +- return +- cost_price = self.output_cost +- if not self.company.currency.is_zero(self.cost - cost_price): +- raise CostError(gettext( +- 'production.msg_uneven_costs', +- production=self.rec_name, +- costs=self.cost, +- outputs=cost_price)) +- + @classmethod + def view_attributes(cls): + return [ diff --git a/series b/series index 23a1da6..07f5b02 100644 --- a/series +++ b/series @@ -70,3 +70,5 @@ project_invoice_progress_compute_qty.diff # [project_invoice] Twice compute qty issue10068.diff # [trytond] Use safe_join in SharedDataMiddlewareIndex issue10053.diff # [party] Configure available identifiers + +issue3209.diff # [production] Not validate cost inputs and outputs 043523 (not merge to 6.x)