Round earliest percentage to 4 digits
issue11061 review355841002
This commit is contained in:
1 parent
da066286d7
commit
3b894a5013
1 file changed
+2
-2
@@ -38,7 +38,7 @@ class QuantityEarlyPlan(Workflow, ModelSQL, ModelView):
|
||||
fields.Date("Earliest Date"), 'get_earliest_date')
|
||||
earliest_percentage = fields.Function(
|
||||
fields.Float(
|
||||
"Earliest Percentage",
|
||||
"Earliest Percentage", digits=(1, 4),
|
||||
states={
|
||||
'invisible': ~Eval('earliest_date'),
|
||||
},
|
||||
@@ -147,7 +147,7 @@ class QuantityEarlyPlan(Workflow, ModelSQL, ModelView):
|
||||
m.origin.internal_quantity for m in self.moves
|
||||
if m.early_date and m.early_date <= date)
|
||||
if total:
|
||||
return quantity / total
|
||||
return round(quantity / total, 4)
|
||||
else:
|
||||
return 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user