changeset 2400885ad5ea in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=2400885ad5ea
description:
Use and test the proper type for quantity and total_quantity in
inventory counting
Since issue10413 assigned value has always the right type.
diffstat:
inventory.py | 2 +-
tests/scenario_stock_inventory_count.rst | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r a8193325c0ad -r 2400885ad5ea inventory.py
--- a/inventory.py Sat Oct 30 11:32:04 2021 +0200
+++ b/inventory.py Sat Oct 30 16:44:30 2021 +0200
@@ -590,7 +590,7 @@
values['product'] = line.product.id
values['uom'] = line.uom.id
if line.uom.rounding == 1:
- values['quantity'] = 1
+ values['quantity'] = 1.
return values
def get_line_domain(self, inventory):
diff -r a8193325c0ad -r 2400885ad5ea tests/scenario_stock_inventory_count.rst
--- a/tests/scenario_stock_inventory_count.rst Sat Oct 30 11:32:04 2021 +0200
+++ b/tests/scenario_stock_inventory_count.rst Sat Oct 30 16:44:30 2021 +0200
@@ -83,9 +83,9 @@
... inventory.id, product.id)).save()
>>> count.execute('quantity')
>>> count.form.quantity
- 1
+ 1.0
>>> count.form.total_quantity
- 1
+ 1.0
>>> count.execute('add')
>>> count.form.search = product