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_checkout_country_vat: Migration to version 18.0 #1027

Merged

Conversation

pilarvargas-tecnativa
Copy link
Contributor

sergio-teruel and others added 16 commits February 24, 2025 12:42
Replace settings with sane defaults. Update VAT flag when address country is updated.
Migrated to v9, with corresponding changes.

Add repo dependency.

Fixes in README.
If you leave country field empty before pressing the confirm button at checkout, you were getting a 500 error because `country_id` was `""` (str), which cannot be searched in an int field.

Now we set a default `False` value, which will return an empty recordset without that problem.
Add is-invalid class to the input tag when an error is received
This module happened to be working accidentally because [it was inheriting from a view that had another inheriting view which defined the necessary elements][1]; but that view can be disabled and then this module breaks.

Fixed by inheriting from the correct view.

Also benefits from OCA/website#720 by using readonly mode if that module is updated.

@Tecnativa TT17694

[1]: https://github.com/odoo/odoo/blob/6e99a89574d11811c03fe3cdc61922352a9610ea/addons/website_sale/views/templates.xml#L1296
Copy link
Contributor

@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.

When I click on the Continue Checkout button, I get this error.

image

Is it possible to search in this list? It's a bit complicated to find the country manually.
image

Comment on lines 8 to 9
[website_sale_default_country](https://github.com/OCA/e-commerce/tree/10.0/website_sale_default_country)
module.
Copy link
Contributor

Choose a reason for hiding this comment

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

This module has not been migrated from V11 onwards. Does it need to be referenced here?

@pedrobaeza
Copy link
Member

/ocabot migration website_sale_checkout_country_vat

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 25, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 25, 2025
16 tasks
@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 18.0-mig-website_sale_checkout_country_vat branch from df8a7fe to 8266009 Compare February 26, 2025 07:21
@pilarvargas-tecnativa
Copy link
Contributor Author

When I click on the Continue Checkout button, I get this error.

You can check again

Is it possible to search in this list? It's a bit complicated to find the country manually.

This is a matter of the base module and the way it has always worked. But it actually does the search when you select the country in the address. I think the module is meant for when you define new addresses, not when you modify them.

Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@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.

LGTM

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-1027-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 08d5a64 into OCA:18.0 Feb 26, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 18.0-mig-website_sale_checkout_country_vat branch February 26, 2025 13:31
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.