mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
20 lines
918 B
Diff
20 lines
918 B
Diff
diff -r 12404f4be997 trytond/trytond/modules/stock_supply_production/production.py
|
|
--- a/trytond/trytond/modules/stock_supply_production/production.py Sat Jan 26 01:12:51 2019 +0100
|
|
+++ b/trytond/trytond/modules/stock_supply_production/production.py Thu Jan 31 12:36:30 2019 +0100
|
|
@@ -1,6 +1,7 @@
|
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
# this repository contains the full copyright notices and license terms.
|
|
import datetime
|
|
+from decimal import Decimal
|
|
from collections import defaultdict
|
|
|
|
from trytond.model import ModelSQL, ValueMixin, fields
|
|
@@ -143,7 +144,7 @@
|
|
product=product,
|
|
bom=product.boms[0].bom if product.boms else None,
|
|
uom=product.default_uom,
|
|
- quantity=quantity,
|
|
+ quantity=float(Decimal(quantity).quantize(Decimal(str(10 ** -product.default_uom.digits)))),
|
|
state='request',
|
|
)
|