[FIX] account_edi_ubl_cii: tax category for supplier without VAT
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/odoo#158670 X-original-commit: 357f1aec4bfa12fe476a207f2acfc1bf4a6232d5 Signed-off-by: Laurent Smet (las) <las@odoo.com> Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
This commit is contained in:
@@ -177,7 +177,7 @@ class AccountEdiCommon(models.AbstractModel):
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user