From 8926cecc6a7bb7c941e7311661e5b49c62016d7b Mon Sep 17 00:00:00 2001 From: HuylenbroeckFlorent Date: Thu, 16 Feb 2023 09:38:19 +0000 Subject: [PATCH] [IMP] sale: remove useless call in discount widget Following up https://github.com/odoo/odoo/pull/112692 that avoided the use of the 'Number' javascript function in the 'product_discount_field' widget, the call to that function was left in the code. It is useless and can be removed since the value of the new field used, the property field 'props.value', is already a float. closes odoo/odoo#112891 X-original-commit: fb8b217f8bd2323d33bbeb949f35cd1620557960 Signed-off-by: Victor Feyens (vfe) --- addons/sale/static/src/js/product_discount_field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/static/src/js/product_discount_field.js b/addons/sale/static/src/js/product_discount_field.js index 75821c68678..d5e3e78f580 100644 --- a/addons/sale/static/src/js/product_discount_field.js +++ b/addons/sale/static/src/js/product_discount_field.js @@ -37,7 +37,7 @@ export class ProductDiscountField extends FloatField { return { operation: "UPDATE", record: line, - data: {["discount"]: Number(this.props.value)}, + data: {["discount"]: this.props.value}, }; });