Saturday, December 23, 2023
1 change · 17.0
Resolved issues and error corrections
When a user clears the quantity field in the product catalog, the product is now treated as having a quantity of zero instead of leaving an empty or invalid value. This keeps the product card display consistent and helps avoid related errors in field service sales workflows.
Original PR description
When the user inputs nothing in the setQuantity input in the product catalog input, NaN is fixed in the productCatalogData.quantity value, which is fine for the backend since the NaN will be converted to Null then 0 when fixed in the SOL qty_product but the product card will display an empty input which is not good. with this change the productCatalogData.quantity will be fixed to 0, making the input space (and minus/plus buttons) disapear, which is more logical since the product quantity has been set to 0 In addition to this it'll prevent a traceback in industry_fsm_sale module where we used float_round() to fix the product quantity, which doesn't handle Null value -> https://github.com/odoo/enterprise/pull/50839 Task-3599491 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr