From f75e1c687b5f2b2e5d1e448d6e62c26ae329bfce Mon Sep 17 00:00:00 2001 From: william-andre <wan@odoo.com> Date: Mon, 24 Apr 2023 16:11:09 +0000 Subject: [PATCH] [FIX] account: manage shipping address without `sale` installed A previous commit[^1] added the shipping address in case the `sale` module is installed. But it didn't manage the case where that module is not installed. opw-3199710 [^1]: bd5071ac16fa20439d5da559677eab84c7b8cb1c closes odoo/odoo#119557 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> --- addons/l10n_de/models/account_move.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/l10n_de/models/account_move.py b/addons/l10n_de/models/account_move.py index 16df2ec03aad..f8f155ab8584 100644 --- a/addons/l10n_de/models/account_move.py +++ b/addons/l10n_de/models/account_move.py @@ -43,7 +43,9 @@ class AccountMove(models.Model): def _compute_l10n_de_addresses(self): for record in self: record.l10n_de_addresses = data = [] - if record.partner_shipping_id == record.partner_id: + if 'partner_shipping_id' not in record._fields: + data.append((_("Invoicing Address:"), record.partner_id)) + elif record.partner_shipping_id == record.partner_id: data.append((_("Invoicing and Shipping Address:"), record.partner_shipping_id)) elif record.move_type in ("in_invoice", "in_refund"): data.append((_("Invoicing and Shipping Address:"), record.partner_id)) -- GitLab