Skip to content
Snippets Groups Projects
Commit f75e1c68 authored by william-andre's avatar william-andre
Browse files

[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]: bd5071ac

closes odoo/odoo#119557

Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
parent bdfceb8e
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment