Use and test the proper type for quantity and total_quantity in inventory counting

Since issue10413 assigned value has always the right type.
This commit is contained in:
Cédric Krier committed 2021-10-30 16:44:30 +02:00
1 parent 1f2a720baf
commit 50a2ea6db5
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -590,7 +590,7 @@ class Count(Wizard):
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):
+2 -2
View File
@@ -83,9 +83,9 @@ Count inventory::
... 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