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

[18.0][MIG] website_sale_vat_required: Migration to version 18.0 #1029

Merged
merged 20 commits into from
Mar 6, 2025

Conversation

carlos-lopez-tecnativa
Copy link
Contributor

Adapt according to this commit: odoo/odoo@453cfab
TT54540
@Tecnativa @pedrobaeza @CarlosRoca13 @pilarvargas-tecnativa could you please review this?

@pedrobaeza
Copy link
Member

/ocabot migration website_sale_vat_required

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 26, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 26, 2025
16 tasks
@carlos-lopez-tecnativa
Copy link
Contributor Author

Copy link
Contributor

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1029-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 6, 2025
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-1029-by-pedrobaeza-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@pedrobaeza
Copy link
Member

@carlos-lopez-tecnativa please rebase and check the problem.

eLBati and others added 14 commits March 6, 2025 12:41
[FIX] Depend on vat validation module that causes the VAT number field to be displayed at checkout in the first place
This addon got migrated from 8.0. Relevant notes:

- Moved from `OCA/website` to `OCA/e-commerce`.
- Reduced license headers to new style ones, keeping copyright.
- Updated README template.
- Replaced dirty hack that disables addon in test mode, and hack the tour instead (actually testing the addon).
- Benefit from upstream updates, that now handles incorrect VAT errors.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_vat_required
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_vat_required/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_vat_required
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_vat_required/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-15.0/e-commerce-15.0-website_sale_vat_required
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_vat_required/
pilarvargas-tecnativa and others added 6 commits March 6, 2025 12:41
…hods in test

Modify the tests so that we don't have to rely on the payment methods
module to run the tests for the functionality of this module.

TT44388
The tests were using a demo data product so if at any time this product
does not exist the tests start to fail. To avoid this, a new product is
created and used for testing. Also to locate the checkout button it is
better to locate it by its container element as the classes can change
depending on the configuration and modules used in the instance and it
can be a problem to locate it.
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-mig-website_sale_vat_required branch from 1028899 to 2c745a5 Compare March 6, 2025 17:51
@carlos-lopez-tecnativa
Copy link
Contributor Author

carlos-lopez-tecnativa commented Mar 6, 2025

@carlos-lopez-tecnativa please rebase and check the problem.

I adapted the code in the tour. The issue was caused because this module hides the element

<xpath expr="//input[@name='vat']" position="attributes">
<attribute name="t-if">0</attribute>
</xpath>
<xpath expr="//input[@name='vat']" position="after">
<t t-call="website_snippet_country_dropdown.country_dropdown">
<t t-set="no_country_field" t-value="'vat'" />
<t t-set="default_value" t-value="partner_sudo.vat or ''" />
and the new elements do not have the same ID. So, I used the name attribute instead.

Could you please retry? Thanks.

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-1029-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 620a7d4 into OCA:18.0 Mar 6, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 18.0-mig-website_sale_vat_required branch March 6, 2025 19:10
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.