Skip to content

Commit

Permalink
[FIX] account_edi_ubl_cii: tax category for supplier without VAT
Browse files Browse the repository at this point in the history
Bug:

When an irish company without VAT invoices a Norvegian company with a 0%
tax, the category of the tax is "K" in the Bis 3 xml, which will raise:
"[BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the
Invoiced item VAT category code (BT-151) is "Intra-community supply"
shall contain the Seller VAT Identifier (BT-31) or the Seller tax
representative VAT identifier (BT-63) and the Buyer VAT identifier
(BT-48)."

Using code "G" would also raise: "[BR-G-02]-An Invoice that contains an
Invoice line (BG-25) where the Invoiced item VAT category code (BT-151)
is "Export outside the EU" shall contain the Seller VAT Identifier
(BT-31) or the Seller tax representative VAT identifier (BT-63)."

Fix:

We should only use "G" or "K" when the supplier has a VAT. If a supplier
without a VAT invoices with a 0% tax, we should use the tax category "E"
(Exempted).

opw-3785810

closes odoo#158670

X-original-commit: 357f1ae
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
  • Loading branch information
JulienVR committed Mar 25, 2024
1 parent 5035312 commit 14479db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account_edi_ubl_cii/models/account_edi_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def create_dict(tax_category_code=None, tax_exemption_reason_code=None, tax_exem
else:
return create_dict(tax_category_code='S') # standard VAT

if supplier.country_id.code in european_economic_area:
if supplier.country_id.code in european_economic_area and supplier.vat:
if tax.amount != 0:
# otherwise, the validator will complain because G and K code should be used with 0% tax
return create_dict(tax_category_code='S')
Expand Down

0 comments on commit 14479db

Please sign in to comment.