[FIX] *: prevent an error while opening POS session#2178
Closed
fw-bot wants to merge 1 commit into
Closed
Conversation
*= ['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
Collaborator
Author
|
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 |
Author
|
@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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

*= ['bowling', 'food_trucks', 'micro_brewery', 'sports_club']
Currently, an error occurs while opening the restaurant session.
Step to reproduce:
TypeError: 'str' object is not a mappingThe 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