[FIX] product: prevent traceback on removing quantity of product in quotation
When user removes the quantity of product and tries to confirm the product in configure wizard, a traceback will appear. Steps to reproduce the error: - Go to Sales > Configuration > Settings > Product Catalog > enable Variant Grid Entry > Pricing > enable Pricelists (Advanced price rules) - Go to products > pricelist > open any pricelist > Add a line > set value of Min. Quantity - Create new Quotation > Select that pricelist > Add a product > Select a product that has variants (ex. Conference Chair) > In configure wizard, remove quantity > Confirm Error: A traceback appears: "TypeError: '<' not supported between instances of 'NoneType' and 'float' " https://github.com/odoo/odoo/blob/fe79e1b5fdc408d55bbb3ac11209163436c1fa2c/addons/product/models/product_pricelist_item.py#L319 Here, when user removes quantity of product, qty_in_product_uom will be None. So it will lead to above traceback. sentry-4547178082 closes odoo/odoo#141523 X-original-commit: 09ff54f1d90be5ef5f2e76deaa481f263c6c75c9 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -139,7 +139,7 @@ class ProductConfiguratorController(Controller):
|
||||
product or product_template,
|
||||
pricelist,
|
||||
combination,
|
||||
quantity=quantity,
|
||||
quantity=quantity or 0.0,
|
||||
uom=product_uom,
|
||||
currency=currency,
|
||||
date=datetime.fromisoformat(so_date),
|
||||
|
||||
Reference in New Issue
Block a user