Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] website_event_filter_city: Country filter support #420

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

pilarvargas-tecnativa
Copy link

When the country filter is inactive, the node used is a span but when the country filter is activated with the editor, the node is replaced by a div and this causes an error. To avoid this, the node is replaced by something generic ‘*’ and so it will be located by its identifying class regardless of whether the element is a span or a div.

cc @Tecnativa

@chienandalu @carlos-lopez-tecnativa please review

@OCA-git-bot
Copy link
Contributor

Hi @yajo,
some modules you are maintaining are being modified, check this out!

@pedrobaeza
Copy link
Member

Take the occasion to change the maintainer to us, as we are the effective maintainers of the module now.

@pedrobaeza pedrobaeza added this to the 17.0 milestone Dec 13, 2024
When the country filter is inactive, the node used is a span but when
the country filter is activated with the editor, the node is replaced
by a div and this causes an error. To avoid this, the node is replaced
by something generic ‘*’ and so it will be located by its identifying
class regardless of whether the element is a span or a div.
@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 17.0-fix-website_event_filter_city branch from 2c3bb40 to 10c1143 Compare December 13, 2024 11:42
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a bit strange; I can't reproduce the issue on any Runboat instance, but in this specific instance, the error is present. Thanks for the fix.

http://oca-event-17-0-030f8b6af6fc.runboat.odoo-community.org/

image

Note: I think it’s a bad practice from Odoo Base if the original view uses a <span> element and another view replaces it and changes it by <div>. Could you create an issue on the Odoo repository?

Original view
https://github.com/odoo/odoo/blob/f6fc5f889d041e471ec3af0fa9ec931e00923be3/addons/website_event/views/event_templates_list.xml#L120

Inherited view
https://github.com/odoo/odoo/blob/f6fc5f889d041e471ec3af0fa9ec931e00923be3/addons/website_event/views/event_templates_list.xml#L225-L237

@pilarvargas-tecnativa
Copy link
Author

It’s a bit strange; I can't reproduce the issue on any Runboat instance, but in this specific instance, the error is present.

Sometimes runboats are not entirely correct in terms of templates or styles, they can fail and I don't know why, but we always have the option of testing the branch locally.

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :)

@pedrobaeza
Copy link
Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-420-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot
Copy link
Contributor

@pedrobaeza The merge process could not be finalized, because command git push origin 17.0-ocabot-merge-pr-420-by-pedrobaeza-bump-minor:17.0 failed with output:

To https://github.com/OCA/event
 ! [remote rejected]   17.0-ocabot-merge-pr-420-by-pedrobaeza-bump-minor -> 17.0 (cannot lock ref 'refs/heads/17.0': is at cfce9b4e138172151f5f69754c95bbe32f1191c4 but expected f733d5fa7a381f7ca8eb46fc99cfd7e03d8fe4dd)
error: failed to push some refs to 'https://github.com/OCA/event'

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at cfce9b4. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 3715d2c into OCA:17.0 Dec 17, 2024
7 checks passed
@pedrobaeza pedrobaeza deleted the 17.0-fix-website_event_filter_city branch December 17, 2024 08:18
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.

5 participants