From c803982184aa8ee6f54767a8b402d6c7dda600c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Thu, 31 Jul 2025 13:04:57 +0200 Subject: [PATCH] [FIX] website_decimal_quantity: fix forcing int --- website_decimal_quantity/README.rst | 1 + website_decimal_quantity/__manifest__.py | 2 +- website_decimal_quantity/models/sale_order.py | 6 +++--- website_decimal_quantity/readme/HISTORY.rst | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/website_decimal_quantity/README.rst b/website_decimal_quantity/README.rst index e68645f..1175e99 100644 --- a/website_decimal_quantity/README.rst +++ b/website_decimal_quantity/README.rst @@ -35,6 +35,7 @@ Changelog ========= - 16.0.1.0.0: Initial version +- 16.0.1.0.1: Fix forcing int Bug Tracker =========== diff --git a/website_decimal_quantity/__manifest__.py b/website_decimal_quantity/__manifest__.py index c355d43..3d43664 100644 --- a/website_decimal_quantity/__manifest__.py +++ b/website_decimal_quantity/__manifest__.py @@ -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", diff --git a/website_decimal_quantity/models/sale_order.py b/website_decimal_quantity/models/sale_order.py index 7bb4a1c..ae56cac 100644 --- a/website_decimal_quantity/models/sale_order.py +++ b/website_decimal_quantity/models/sale_order.py @@ -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 diff --git a/website_decimal_quantity/readme/HISTORY.rst b/website_decimal_quantity/readme/HISTORY.rst index e8d59fb..65cb14e 100644 --- a/website_decimal_quantity/readme/HISTORY.rst +++ b/website_decimal_quantity/readme/HISTORY.rst @@ -1 +1,2 @@ -- 16.0.1.0.0: Initial version \ No newline at end of file +- 16.0.1.0.0: Initial version +- 16.0.1.0.1: Fix forcing int \ No newline at end of file