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:
1 parent
1f2a720baf
commit
50a2ea6db5
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user