<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/base_vat/models, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] base_vat: patch orm limitation</title>
<updated>2021-04-09T12:08:01+00:00</updated>
<author>
<name>oco-odoo</name>
<email>oco@odoo.com</email>
</author>
<published>2021-04-07T12:44:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7faa11ca87cb5308df1d1921a674e2e2edc3f065'/>
<id>7faa11ca87cb5308df1d1921a674e2e2edc3f065</id>
<content type='text'>
https://github.com/odoo/odoo/pull/68253 fixed a bug in check_vat that caused it not to run any check when called on a partner with no country.

However, doing this caused another issue because of an ORM limitation: when writing vat and country_id with a single write() on the res.company, two distinct write are triggered on the related res.partner, one for each field. Both those write trigger the check_vat constraint.

Depending on the order in which the keys of the dictionnary passed to res.company's write were ordered, country_id could or could not be written before vat. If vat was written first and did not start with a country code, the write() on res.partner failed the constraint, because country_id wasn't set yet. This was wrong, but used to pass as there was no country_id on the partner, before https://github.com/odoo/odoo/pull/68253 fixed that.

To circumvent the issue, we now allow entering any vat number without performing any check if it does not start with a country code and no country_id is set on the partner.

closes odoo/odoo#69034

X-original-commit: 3b73ea994a0eedc08ee0e7c43610ca5e78984b54
Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/odoo/odoo/pull/68253 fixed a bug in check_vat that caused it not to run any check when called on a partner with no country.

However, doing this caused another issue because of an ORM limitation: when writing vat and country_id with a single write() on the res.company, two distinct write are triggered on the related res.partner, one for each field. Both those write trigger the check_vat constraint.

Depending on the order in which the keys of the dictionnary passed to res.company's write were ordered, country_id could or could not be written before vat. If vat was written first and did not start with a country code, the write() on res.partner failed the constraint, because country_id wasn't set yet. This was wrong, but used to pass as there was no country_id on the partner, before https://github.com/odoo/odoo/pull/68253 fixed that.

To circumvent the issue, we now allow entering any vat number without performing any check if it does not start with a country code and no country_id is set on the partner.

closes odoo/odoo#69034

X-original-commit: 3b73ea994a0eedc08ee0e7c43610ca5e78984b54
Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: Don't always pass VAT check when validating the VAT of a partner without country_id</title>
<updated>2021-04-02T09:45:24+00:00</updated>
<author>
<name>oco-odoo</name>
<email>oco@odoo.com</email>
</author>
<published>2021-03-23T15:29:47+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=72b7fb15db4df1a3336bc6e90fe60f49877c52f8'/>
<id>72b7fb15db4df1a3336bc6e90fe60f49877c52f8</id>
<content type='text'>
Before this, when making a partner without any country_id, any VAT could be set to it, which was inconsistent with the module's purpose.

closes odoo/odoo#68492

X-original-commit: 4c962437bd59a1e9302d8034e8870880994eb713
Related: odoo/enterprise#17358
Signed-off-by: Cedric Snauwaert (csn) &lt;csn@openerp.com&gt;
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this, when making a partner without any country_id, any VAT could be set to it, which was inconsistent with the module's purpose.

closes odoo/odoo#68492

X-original-commit: 4c962437bd59a1e9302d8034e8870880994eb713
Related: odoo/enterprise#17358
Signed-off-by: Cedric Snauwaert (csn) &lt;csn@openerp.com&gt;
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: accept XI VAT format</title>
<updated>2021-03-08T10:28:59+00:00</updated>
<author>
<name>Andrea Grazioso (agr-odoo)</name>
<email>agr@odoo.com</email>
</author>
<published>2021-03-02T10:45:13+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7e7d8731aa5679123100311b573a65ae23f3db99'/>
<id>7e7d8731aa5679123100311b573a65ae23f3db99</id>
<content type='text'>
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
https://github.com/arthurdejong/python-stdnum/commit/b93d69581f35aa18e7fdd52b3f7fdf06770215e3
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
https://github.com/odoo/odoo/issues/64891

opw-2461322

closes odoo/odoo#67402

X-original-commit: 049ea814283448e44e102969ffd08837f110e3ea
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following Brexit on January 1st 2021, companies in Northern Ireland have
a new VAT number starting with XI instead of GB. More info:
https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business

stdnum support the new XI VAT from 1.16
https://github.com/arthurdejong/python-stdnum/commit/b93d69581f35aa18e7fdd52b3f7fdf06770215e3
This patch add temporary support in base_vat until the new version
is available on the Debian package repository

Community tracked issue
https://github.com/odoo/odoo/issues/64891

opw-2461322

closes odoo/odoo#67402

X-original-commit: 049ea814283448e44e102969ffd08837f110e3ea
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: not called at all</title>
<updated>2021-02-10T12:22:42+00:00</updated>
<author>
<name>wan</name>
<email>wan@odoo.com</email>
</author>
<published>2021-02-09T08:49:24+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9a46cc7ad89544a5669b4e5a7ae8b6c31d52eab3'/>
<id>9a46cc7ad89544a5669b4e5a7ae8b6c31d52eab3</id>
<content type='text'>
The function was wrongly imported and used, and it was hidden by a
generic catching of all exceptions.
The return value and some legit exceptions were also badly handled:
* The return value was always thruthy as it returns an object containing
information about the check.
* Exceptions can be raised if the format is not correct. In that case,
we don't want to go to the simple vat check.

Fixes #64897
opw-2451951

closes odoo/odoo#65771

Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function was wrongly imported and used, and it was hidden by a
generic catching of all exceptions.
The return value and some legit exceptions were also badly handled:
* The return value was always thruthy as it returns an object containing
information about the check.
* Exceptions can be raised if the format is not correct. In that case,
we don't want to go to the simple vat check.

Fixes #64897
opw-2451951

closes odoo/odoo#65771

Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: fix ABN check for Australia</title>
<updated>2021-01-07T13:55:54+00:00</updated>
<author>
<name>Andrea Grazioso (agr-odoo)</name>
<email>agr@odoo.com</email>
</author>
<published>2021-01-06T09:40:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a72f7222c9f5987a20461be9c837e3de73801ff7'/>
<id>a72f7222c9f5987a20461be9c837e3de73801ff7</id>
<content type='text'>
The Australian equivalent of a VAT number is an ABN number.
In Australia TFN are private and not meant to be entered into
systems or publicly displayed.
ABN numbers are the public facing number that legally must be displayed
on all tax invoices and legal documents.

This fix will override the 'tfn' check done via stdnum for AU companies
with 'abn' check

opw-2415142

closes odoo/odoo#64131

Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Australian equivalent of a VAT number is an ABN number.
In Australia TFN are private and not meant to be entered into
systems or publicly displayed.
ABN numbers are the public facing number that legally must be displayed
on all tax invoices and legal documents.

This fix will override the 'tfn' check done via stdnum for AU companies
with 'abn' check

opw-2415142

closes odoo/odoo#64131

Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: wrong example vatnumber for CH</title>
<updated>2020-10-12T15:54:07+00:00</updated>
<author>
<name>Baptiste Vergote</name>
<email>bve@odoo.com</email>
</author>
<published>2020-10-12T08:42:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bd95b7174bdf6c0e6a0dfcd394b69a519fde25be'/>
<id>bd95b7174bdf6c0e6a0dfcd394b69a519fde25be</id>
<content type='text'>
As described here:
https://www.estv.admin.ch/estv/fr/home/mehrwertsteuer/fachinformationen/steuerpflicht/unternehmens-identifikationsnummer--uid-.html

The "new" (since 2014) vat number has to be displayed as:
CHE 9 numeric digits plus TVA/MWST/IVA
e.g.: CHE-123.456.788 TVA

This commit removes the previous 6 digits vat number check and regex,
and provide accurate examples on the error message displayed if the
vatnumber given is wrong.

opw-2291581

closes odoo/odoo#59789

X-original-commit: 624e086f0c8ac854fd292d3c6dd14a71ed67b9fe
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As described here:
https://www.estv.admin.ch/estv/fr/home/mehrwertsteuer/fachinformationen/steuerpflicht/unternehmens-identifikationsnummer--uid-.html

The "new" (since 2014) vat number has to be displayed as:
CHE 9 numeric digits plus TVA/MWST/IVA
e.g.: CHE-123.456.788 TVA

This commit removes the previous 6 digits vat number check and regex,
and provide accurate examples on the error message displayed if the
vatnumber given is wrong.

opw-2291581

closes odoo/odoo#59789

X-original-commit: 624e086f0c8ac854fd292d3c6dd14a71ed67b9fe
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: check VAT numbers UAxxx</title>
<updated>2020-10-06T11:29:25+00:00</updated>
<author>
<name>Nicolas Martinelli</name>
<email>nim@odoo.com</email>
</author>
<published>2020-10-02T14:30:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=756000551be5508dce83820c7f014ded6894406f'/>
<id>756000551be5508dce83820c7f014ded6894406f</id>
<content type='text'>
- Go to the Contacts app
- Click on the Azure Interior company, or any other company with multiple associated people
- Set the country to Mexico
- Edit the VAT field and enter the following string: UAC070620MB3

Traceback will happen after hitting save.

It happens because `self` is a recordset in this case. Moreover, while
the VAT number starts with `UA`, the country is Mexico so the check is
incorrct.

opw-2348045

closes odoo/odoo#59257

X-original-commit: 3dbdc62b3458e9af2e74d8552a17d629dc7e2393
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Go to the Contacts app
- Click on the Azure Interior company, or any other company with multiple associated people
- Set the country to Mexico
- Edit the VAT field and enter the following string: UAC070620MB3

Traceback will happen after hitting save.

It happens because `self` is a recordset in this case. Moreover, while
the VAT number starts with `UA`, the country is Mexico so the check is
incorrct.

opw-2348045

closes odoo/odoo#59257

X-original-commit: 3dbdc62b3458e9af2e74d8552a17d629dc7e2393
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base_vat: remove simple check vat for co</title>
<updated>2020-08-17T14:11:07+00:00</updated>
<author>
<name>Nikunj Ladava</name>
<email>nla@odoo.com</email>
</author>
<published>2020-04-14T07:00:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=34c4752eeafc33bd88e18c7f0408dfda17dfa8d8'/>
<id>34c4752eeafc33bd88e18c7f0408dfda17dfa8d8</id>
<content type='text'>
- removed simple check vat for columbia
- removed document type field from partner
  - document type will be managed by latam type
-  updated city name for colombia
- added data for for latam identification type
- Added depdencies
  - base_address_city
  - account_debit_note
  - l10n_latam_base

task- 2190843

closes odoo/odoo#53040

Related: odoo/upgrade#1589
Related: odoo/enterprise#9567
Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- removed simple check vat for columbia
- removed document type field from partner
  - document type will be managed by latam type
-  updated city name for colombia
- added data for for latam identification type
- Added depdencies
  - base_address_city
  - account_debit_note
  - l10n_latam_base

task- 2190843

closes odoo/odoo#53040

Related: odoo/upgrade#1589
Related: odoo/enterprise#9567
Signed-off-by: Josse Colpaert &lt;jco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_vat: fixes format of Switzerland VAT</title>
<updated>2020-08-06T15:07:11+00:00</updated>
<author>
<name>Anh Thao Pham (pta)</name>
<email>pta@odoo.com</email>
</author>
<published>2020-07-31T07:00:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=637232a8c9f663c01c129d67854f50ab9e3059f3'/>
<id>637232a8c9f663c01c129d67854f50ab9e3059f3</id>
<content type='text'>
- Install Contacts and Belgium - Accounting (l10n_be)
- Go to Contacts and create a new Contact:
  * Select Switzerland as Country
  * Enter "CHE-123.456.788 TVA" ad VAT
The VAT is auto-updated to "CHE123456788TVA", removing all special characters.

The entered VAT is converted to its minimal representation, stripping whitespaces and seperators.
And it is this compacted value that is stored.

As defined here (https://www.estv.admin.ch/estv/fr/home/mehrwertsteuer/fachinformationen/steuerpflicht/unternehmens-identifikationsnummer--uid-.html),
the Swiss VAT format should be CHE-XXX.XXX.XXX TVA.
Therefore, the VAT will be automatically formated to the official format.

opw-2291581

closes odoo/odoo#55582

X-original-commit: d75614e22f5b0b72e6bebd9cafba36fe32b9eb51
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Install Contacts and Belgium - Accounting (l10n_be)
- Go to Contacts and create a new Contact:
  * Select Switzerland as Country
  * Enter "CHE-123.456.788 TVA" ad VAT
The VAT is auto-updated to "CHE123456788TVA", removing all special characters.

The entered VAT is converted to its minimal representation, stripping whitespaces and seperators.
And it is this compacted value that is stored.

As defined here (https://www.estv.admin.ch/estv/fr/home/mehrwertsteuer/fachinformationen/steuerpflicht/unternehmens-identifikationsnummer--uid-.html),
the Swiss VAT format should be CHE-XXX.XXX.XXX TVA.
Therefore, the VAT will be automatically formated to the official format.

opw-2291581

closes odoo/odoo#55582

X-original-commit: d75614e22f5b0b72e6bebd9cafba36fe32b9eb51
Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: use named placeholders in translated message</title>
<updated>2020-06-18T11:03:34+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-06-15T13:16:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=80e97e98ce76067db1079af8feeef667cfadf837'/>
<id>80e97e98ce76067db1079af8feeef667cfadf837</id>
<content type='text'>
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
</pre>
</div>
</content>
</entry>
</feed>
