Skip to content

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

Closed
fw-bot wants to merge 1 commit into
odoo:saas-19.3from
odoo-dev:saas-19.3-saas-19.1-bowling-fix-type-error-dhgoy-526864-fw
Closed

[FIX] *: prevent an error while opening POS session#2178
fw-bot wants to merge 1 commit into
odoo:saas-19.3from
odoo-dev:saas-19.3-saas-19.1-bowling-fix-type-error-dhgoy-526864-fw

Conversation

@fw-bot
Copy link
Copy Markdown

@fw-bot fw-bot commented May 18, 2026

*= ['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

 *= ['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

X-original-commit: a73cfec
@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 18, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Author

fw-bot commented May 18, 2026

This PR targets saas-19.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@fw-bot
Copy link
Copy Markdown
Author

fw-bot commented May 18, 2026

@dhgoy-odoo @vava-odoo ci/industry failed on this forward-port PR

robodoo pushed a commit that referenced this pull request May 18, 2026
 *= ['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

closes #2178

X-original-commit: a73cfec
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
@robodoo robodoo closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants