[FIX] website_decimal_quantity: fix forcing int

This commit is contained in:
Niels Göttsch 2025-07-31 13:04:57 +02:00 committed by madmooose
parent c509a1be9b
commit c803982184
4 changed files with 7 additions and 5 deletions

View file

@ -35,6 +35,7 @@ Changelog
=========
- 16.0.1.0.0: Initial version
- 16.0.1.0.1: Fix forcing int
Bug Tracker
===========

View file

@ -20,7 +20,7 @@
#############################################################################
{
"name": "Website Decimal Quantity",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"category": "Website/Website",
"author": "Cybrosys Techno Solutions,BAKEUP",
"company": "Cybrosys Techno Solutions",

View file

@ -89,12 +89,12 @@ class SaleOrder(models.Model):
set_qty = 0
quantity = 0
if set_qty:
quantity = int(set_qty)
quantity = float(set_qty)
elif add_qty is not None:
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:
quantity = int(add_qty) or 0
quantity = float(add_qty) or 0
if quantity > 0:
quantity, warning = self._verify_updated_quantity(
order_line, product_id, quantity, **kwargs

View file

@ -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