Return production's cost rounded to field's precision

issue4610
review14061002
This commit is contained in:
Guillem Barba committed 2015-03-05 13:03:11 +01:00
1 parent e0df7c57f7
commit 2eeef817f3
1 file changed
+3 -1
+3 -1
View File
@@ -340,7 +340,9 @@ class Production(Workflow, ModelSQL, ModelView):
else:
cost_price = input_.product.cost_price
cost += (Decimal(str(input_.internal_quantity)) * cost_price)
return cost
digits = self.__class__.cost.digits
return cost.quantize(Decimal(str(10 ** -digits[1])))
@fields.depends('inputs')
def on_change_with_cost(self):