[FIX] spa_resort: prevent error when opening the Contact Us page#1852
Open
assh-odoo wants to merge 1 commit intoodoo:saas-19.1from
Open
[FIX] spa_resort: prevent error when opening the Contact Us page#1852assh-odoo wants to merge 1 commit intoodoo:saas-19.1from
assh-odoo wants to merge 1 commit intoodoo:saas-19.1from
Conversation
Collaborator
f252754 to
4adfbec
Compare
maan-odoo
approved these changes
Mar 18, 2026
dhrs-odoo
reviewed
Mar 18, 2026
Contributor
There was a problem hiding this comment.
Removing the record isn’t an ideal solution, since you’d still need to adjust the xpath to match the latest code changes. Also, this approach ends up displaying a random image that isn’t relevant to the industry,
Instead you could adapt xpaths something like this
<xpath expr="//t[@t-name='website.contactus']//div[hasclass('col-lg-5')]/img" position="replace">
<img src="/web/image/spa_resort.ir_attachment_1139" class="img img-fluid rounded" alt=""/>
</xpath>
Contributor
Author
There was a problem hiding this comment.
Instead you could adapt xpaths something like this
<xpath expr="//t[@t-name='website.contactus']//div[hasclass('col-lg-5')]/img" position="replace"> <img src="/web/image/spa_resort.ir_attachment_1139" class="img img-fluid rounded" alt=""/> </xpath>
Thanks for the suggestion.
After applying the new XPath, the image is displayed at half the size compared to the form.
After discussing this with @dhrs-odoo , I have applied the changes.
Currently, an error occurs when the user opens the Contact Us page. Steps to Reproduce: - Install the spa_resort with demo data. - Go to Website > Contact Us. ValueError: Element '<xpath expr="//t[@T-name='website.contactus']//span[hasclass('s_parallax_bg')]">' cannot be located in parent view The error starts occurring from saas-19.1 because, after [this commit] where the Contact Us page was reworked to better showcase the capabilities of the website builder, the span element was replaced, but the code still references an XPath [1] that was removed from the main view. As result, opening the Contact Us page raises this error. This commit replaces the default website aside image with a spa resort related image, as the banner is no longer used in the main view. [this commit]: odoo/odoo@ba8d1f6#diff-409cc7362c7557970ce7506fc9a1097c37c7869b7cd815ce463db38a3b7a8239 [1]: https://github.com/odoo/industry/blob/bdbdd15f11f3304f192f44a7baf0743520ba8ae6/spa_resort/demo/website_view.xml#L308-L309 [2]: https://github.com/odoo/odoo/blob/072a8e4fd061ff23902e6e448a577624cb27e188/addons/website/data/website_data.xml#L35-L36 sentry-7336372498
4adfbec to
61663a8
Compare
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.

Currently, an error occurs when the user opens the Contact Us page.
Steps to Reproduce:
spa_resortwith demo data.Website>Contact Us.ValueError: Element '<xpath expr="//t[@t-name='website.contactus']//span[hasclass('s_parallax_bg')]">' cannot be located in parent viewThe error starts occurring from saas-19.1 because, after this commit where the Contact Us
page was reworked to better showcase the capabilities of the website builder, the span element
was removed, but the code still references an XPath [1] that was removed from the main view.
As result, opening the Contact Us page raises this error.
This commit replaces the default website aside image with spa resort
related image, as the banner is no longer used in the main view.
[1]-
industry/spa_resort/demo/website_view.xml
Lines 308 to 309 in bdbdd15
sentry-7336372498