[FIX] account_facturx: Don't import the delivery address

When exporting, the delivery address is put inside the xml.
This field is added by the 'sale' module and is not supposed to be displayed for vendor bill.
However, even if this field isn't displayed, the factur-x module was setting the wrong delivery address on it.

closes odoo/odoo#79410

Issue: 2668902
X-original-commit: a127515d890df74e341c0f08406ef451a638f639
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
This commit is contained in:
Laurent Smet
2021-11-08 08:40:13 +00:00
parent ea53ad6af4
commit 131babe41e
@@ -154,14 +154,6 @@ class AccountEdiFormat(models.Model):
vat=_find_value(f"//ram:{partner_type}/ram:SpecifiedTaxRegistration/ram:ID"),
)
# Delivery partner
if 'partner_shipping_id' in invoice._fields:
invoice_form.partner_shipping_id = self._retrieve_partner(
name=_find_value("//ram:ShipToTradeParty/ram:Name"),
mail=_find_value("//ram:ShipToTradeParty//ram:URIID[@schemeID='SMTP']"),
vat=_find_value("//ram:ShipToTradeParty/ram:SpecifiedTaxRegistration/ram:ID"),
)
# Reference.
elements = tree.xpath('//rsm:ExchangedDocument/ram:ID', namespaces=tree.nsmap)
if elements: