From bd152437327867dc8380e5d28367730014b9c194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Thu, 31 Jul 2025 13:06:26 +0200 Subject: [PATCH] [FIX] nfu_ecommerce: escape float values --- nfu_ecommerce/README.rst | 3 ++- nfu_ecommerce/__manifest__.py | 2 +- nfu_ecommerce/models/sale_order.py | 3 ++- nfu_ecommerce/readme/HISTORY.rst | 3 ++- nfu_ecommerce/static/description/index.html | 4 +++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/nfu_ecommerce/README.rst b/nfu_ecommerce/README.rst index a29e6f0..50f90e3 100644 --- a/nfu_ecommerce/README.rst +++ b/nfu_ecommerce/README.rst @@ -52,7 +52,8 @@ Changelog :1.3.1: Remove Max Qty from first page :1.3.2: Add decimal to ribbon :1.4.0: Add credit warning and avoid debts option -:1.4.0: Add credit to portal details +:1.4.1: Add credit to portal details +:1.4.2: Catch unescaped float values Bug Tracker =========== diff --git a/nfu_ecommerce/__manifest__.py b/nfu_ecommerce/__manifest__.py index d905766..415a840 100644 --- a/nfu_ecommerce/__manifest__.py +++ b/nfu_ecommerce/__manifest__.py @@ -4,7 +4,7 @@ "author": "BAKEUP", "website": "https://www.bakeup.org", "category": "website", - "version": "16.0.1.4.1", + "version": "16.0.1.4.2", "depends": [ "sale_product_configurator", "website_sale", diff --git a/nfu_ecommerce/models/sale_order.py b/nfu_ecommerce/models/sale_order.py index f3f63bc..21d54f0 100644 --- a/nfu_ecommerce/models/sale_order.py +++ b/nfu_ecommerce/models/sale_order.py @@ -44,10 +44,11 @@ class SaleOrder(models.Model): product_custom_attribute_values=product_custom_attribute_values, **kwargs ) + max_qty = float(kwargs.get("max_qty")) if kwargs.get("max_qty") else quantity values.update( { "product_uom_ordered_qty": quantity, - "product_uom_max_qty": kwargs.get("max_qty", quantity), + "product_uom_max_qty": max_qty, } ) return values diff --git a/nfu_ecommerce/readme/HISTORY.rst b/nfu_ecommerce/readme/HISTORY.rst index 84536ad..6191ea1 100644 --- a/nfu_ecommerce/readme/HISTORY.rst +++ b/nfu_ecommerce/readme/HISTORY.rst @@ -8,4 +8,5 @@ :1.3.1: Remove Max Qty from first page :1.3.2: Add decimal to ribbon :1.4.0: Add credit warning and avoid debts option -:1.4.0: Add credit to portal details \ No newline at end of file +:1.4.1: Add credit to portal details +:1.4.2: Catch unescaped float values \ No newline at end of file diff --git a/nfu_ecommerce/static/description/index.html b/nfu_ecommerce/static/description/index.html index 5b211ff..7fb8fb6 100644 --- a/nfu_ecommerce/static/description/index.html +++ b/nfu_ecommerce/static/description/index.html @@ -421,7 +421,9 @@ adjustes the uom quantitiy 1.4.0:Add credit warning and avoid debts option -1.4.0:Add credit to portal details +1.4.1:Add credit to portal details + +1.4.2:Catch unescaped float values