[FIX] website_decimal_quantity: fix forcing int
This commit is contained in:
parent
c509a1be9b
commit
c803982184
4 changed files with 7 additions and 5 deletions
|
|
@ -35,6 +35,7 @@ Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
- 16.0.1.0.0: Initial version
|
- 16.0.1.0.0: Initial version
|
||||||
|
- 16.0.1.0.1: Fix forcing int
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#############################################################################
|
#############################################################################
|
||||||
{
|
{
|
||||||
"name": "Website Decimal Quantity",
|
"name": "Website Decimal Quantity",
|
||||||
"version": "16.0.1.0.0",
|
"version": "16.0.1.0.1",
|
||||||
"category": "Website/Website",
|
"category": "Website/Website",
|
||||||
"author": "Cybrosys Techno Solutions,BAKEUP",
|
"author": "Cybrosys Techno Solutions,BAKEUP",
|
||||||
"company": "Cybrosys Techno Solutions",
|
"company": "Cybrosys Techno Solutions",
|
||||||
|
|
|
||||||
|
|
@ -89,12 +89,12 @@ class SaleOrder(models.Model):
|
||||||
set_qty = 0
|
set_qty = 0
|
||||||
quantity = 0
|
quantity = 0
|
||||||
if set_qty:
|
if set_qty:
|
||||||
quantity = int(set_qty)
|
quantity = float(set_qty)
|
||||||
elif add_qty is not None:
|
elif add_qty is not None:
|
||||||
if order_line:
|
if order_line:
|
||||||
quantity = order_line.product_uom_qty + (int(add_qty) or 0)
|
quantity = order_line.product_uom_qty + (float(add_qty) or 0)
|
||||||
else:
|
else:
|
||||||
quantity = int(add_qty) or 0
|
quantity = float(add_qty) or 0
|
||||||
if quantity > 0:
|
if quantity > 0:
|
||||||
quantity, warning = self._verify_updated_quantity(
|
quantity, warning = self._verify_updated_quantity(
|
||||||
order_line, product_id, quantity, **kwargs
|
order_line, product_id, quantity, **kwargs
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
- 16.0.1.0.0: Initial version
|
- 16.0.1.0.0: Initial version
|
||||||
|
- 16.0.1.0.1: Fix forcing int
|
||||||
Loading…
Reference in a new issue