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

[13.0] base_vat: Cleaning only happens if you introduce the country code in the VAT #69333

Open
pedrobaeza opened this issue Apr 15, 2021 · 5 comments

Comments

@pedrobaeza
Copy link
Collaborator

Impacted versions: 13.0

Steps to reproduce:

  • Create a contact.
  • Set Spain as country.
  • Put VAT 05680675-C

Current behavior:

The VAT is validated, but stored as is (05680675-C).

Expected behavior:

The VAT is validated, and stored as 05680675C, or even better, stored as ES05680675C.

The explanation is in this line of code:

if code and code.lower() != vat_country:

where there's no cleaning if no country code is found on the VAT.

I think we should normalize the VAT input to be homogeneous (with the country code), the same we do with the phone numbers, or if not, we may have a contact with 05680675C and another ES05680675C, and not being detected as duplicated VAT number.

@pedrobaeza
Copy link
Collaborator Author

@oco-odoo I think you can be the more suitable to talk about this, as you have recently do all the work for assuring the verification.

@mart-e also worked if I don't remember bad on allowing to not needing the country prefix in their moment.

@oco-odoo
Copy link
Contributor

@pedrobaeza Sorry for the late answer. I agree VAT check could be improved. We discussed it with @tsb-odoo , and added your feedback to the list of things to consider when improving that :) It will be for master, though, as we don't want to break any flow depending on the current behavior (even if it's not perfect).

@pedrobaeza
Copy link
Collaborator Author

Yeah, I suppose that this kind of thing is not the best for stable versions, but at least if you include it on master is a great thing for homogenizing this and not having more side effects.

@pedrobaeza
Copy link
Collaborator Author

@oco-odoo any news about this?

@oco-odoo
Copy link
Contributor

oco-odoo commented Nov 3, 2021

@pedrobaeza Not yet. Still in the list of things to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants