reka-odoo 9d1d3037b6 [FIX] website_sale: prevent typeerror when ribbon background color is False
When the user creates a new ribbon without a background color,
a traceback will appear.

Steps to reproduce the error:
- Install "website_sale"
- Go to Website > eCommerce > Products
- Pick a product > Sales > Create a new ribbon without a background color
- Save & Close

Error: A traceback appears:
"TypeError: argument of type 'bool' is not iterable"

https://github.com/odoo/odoo/blob/806a60d9766e4e04f461a0fb7c824cf5f5c7d5ae/addons/website_sale/models/product_ribbon.py#L24
Here, when the user creates a new ribbon without a background color,
"bg_color" will be False, so when it tries to check "vals['bg_color']".
It will lead to the above traceback.

sentry-5077714703

closes odoo/odoo#158954

X-original-commit: e9021f1332b49042733cf263e8cb62218ccc2965
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
2024-03-27 10:59:18 +00:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%