Mahamadasif Ansari bcf9e08e9e [FIX] lunch: prevent list index out of range error
Currently, an error occurs when the user tries to add an order with toppings.

This is because before 17.0, [1] got values like `[6, False (1, 2)]`, where
we found the `values['topping_ids_1'][0][2] (ids (1,2))`.  But after 17.0,
[1] got values like `[[4, 1], [4, 2]]`. As a result, it cannot be found in
the `[0][2]` index at [1].

This commit fixes the above issue by using 'convert_to_cach()', which returns
the ids from [[4, 1], [4, 2]]. Apart from that, this commit also improves the
code by adding a loop to get topping IDs for each topping.

[1]-https://github.com/odoo/odoo/blob/039407cf2954ce6298aa8af7aff251a1cefdc39b/addons/lunch/models/lunch_order.py#L99

sentry-4627940064

closes odoo/odoo#142701

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-04-19 09:20:25 +00:00
2024-04-15 09:10:09 +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%