From d5b46020c3cbedc415084676feb90568f5750a74 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 14 Sep 2018 13:42:09 +0200 Subject: [PATCH] [FIX] l10n_be_intrastat: shipping country - Create a partner in Germany - Set an invoice address for this partner in Poland - Create an invoice for the Poland address, but the delivery to Germany - Validate invoice The Intrastat reports the transaction in Poland, while it should be Germany. opw-1878590 --- addons/l10n_be_intrastat/wizard/xml_decl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_be_intrastat/wizard/xml_decl.py b/addons/l10n_be_intrastat/wizard/xml_decl.py index 37d2082becf..1758b650641 100644 --- a/addons/l10n_be_intrastat/wizard/xml_decl.py +++ b/addons/l10n_be_intrastat/wizard/xml_decl.py @@ -176,7 +176,7 @@ class XmlDeclaration(models.TransientModel): if inv_line.invoice_id.intrastat_country_id: excnt = inv_line.invoice_id.intrastat_country_id.code else: - excnt = inv_line.invoice_id.partner_id.country_id.code + excnt = inv_line.invoice_id.partner_shipping_id.country_id.code or inv_line.invoice_id.partner_id.country_id.code #Check region #If purchase, comes from purchase order, linked to a location,