odoo/industry#2178

Created by fw-bot
Merged at 3d1bcee94ae4b215f41b551f0343abbb6dc7584d

Statuses:

label
odoo-dev:saas-19.3-saas-19.1-bowling-fix-type-error-dhgoy-526864-fw
head
93e4ccf0e7d398e611dfbc7f399de0f8964e6fde
merged
5 days ago by Industry, Vallaeys Valentin (vava)
odoo/industry
saas-19.1 #2168
saas-19.2 #2175
saas-19.3 #2178
master #2180

[FIX] *: prevent an error while opening POS session

*= ['bowling', 'food_trucks', 'micro_brewery', 'sports_club']

Currently, an error occurs while opening the restaurant session.

Step to reproduce:
- Install the bowling module.
- Open the Restaurant POS session.

TypeError: 'str' object is not a mapping

The issue occurs because floor_plan_layout values are defined as strings in XML
data. During floor plan computation, the value is later unpacked as a
dictionary [1], which causes the traceback

link [1]: https://github.com/odoo/odoo/blob/76e179f24807612f2d864f14f1a0a1a5661585b0/addons/pos_restaurant/models/pos_config.py#L186

To fix this issue, define floor_plan_layout values using eval="{}" in the XML
data, so they are stored as dictionaries instead of strings.

The same issue also exists in food_trucks, micro_brewery, and sports_club, but
no traceback occurs because module_pos_restaurant(Is a Bar/Restaurant) is
disabled (False), which skips the restaurant floor plan computation. If
that is enabled (True), the same error will occur.

Task ID-6193639

Forward-Port-Of: #2175
Forward-Port-Of: #2168