Commit Graph
6 Commits
Author SHA1 Message Date
Goffin Simon ca14f232e0 [FIX] base_vat_autocomplete: Create contact using VAT number
Let's install base_vat_autocomplete and  base_address_extended
When creating a contact with a VAT number, the street was not
formated by the autocomplete in a correct way because the function checkVat all the time
returns the street with the following format: '%(street_name)s, %(street_number)s/%(street_number2)s'
and this function doesn't take the street format of the country into account.

So the function _split_street tried to split the street into street_name, street_number, street_number2 with the
street_format of the partner but the street was  not well formated by checkVat.

opw:1867491
2018-07-24 09:54:29 +02:00
Goffin Simon 652e336deb [FIX] base_vat_autocomplete: address format of swedish company
Swedish Postal Codes are 5-digit codes with the following format: XXX XX

Before the fix:

With VAT=SE556242088401

For [zip_code] [city] = [171 42] [SOLNA]

we got [zip_code] [city] = [171] [42 SOLNA] because 'zip_code' didn't allow whitespaces

opw:1841010
2018-05-08 17:15:36 +02:00
Moisés López c2fec7ed88 [FIX] base_vat_autocomplete: add compatibility with python-stdnum>=1.9
The `country_codes` variable was replaced by `_country_codes` at
arthurdejong/python-stdnum@c113613b70

Make sure the syntax is the same

Closes #24395
2018-04-25 11:04:31 +02:00
Lucas Perais (lpe) 9645a64d0e [FIX] base_vat_autocomplete: address fields should not be conservered on change vat
Bafore this commit, fields that were not written during on change were kept
leading to having a wrong overall address when changing vat when the return of the API
did not contain the same fields as before.
Also, ZIP from Netherlands were not supported

After this commit, when changing the VAT number, fields that were not set by this operation
are reset to False
Also, NL zip codes compute fine

OPW 807666
2018-02-08 10:29:30 +01:00
Laurent Smet c2f59f08c7 [IMP] base_vat_autocomplete: don't block the user with VIES service
- When the VIES service is unreachable/unavailable, don't raise an error.
- Set the timeout to 5 seconds instead of default 120 seconds.

-task: 35043
2017-10-17 11:21:58 +02:00
qdp-odoo 99385d660d [ADD] base_vat_autocomplete: module to fill partner's data from the VIES when encoding its VAT number 2017-07-12 17:48:43 +02:00