[FIX] account: Compute method failed to assign account.move(<NewId 0x7f9057669400>,).show_discount_details

closes odoo/odoo#105107

X-original-commit: d1b37264ae9ae85f5c19fdd1ea62bd9a3a637dd0
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit is contained in:
niyasraphy
2022-11-07 09:12:17 +01:00
parent 6ad32b2732
commit fa23b2b578
+1
View File
@@ -1257,6 +1257,7 @@ class AccountMove(models.Model):
invoice.show_discount_details = any(line.discount_date for line in payment_term_lines)
invoice.show_payment_term_details = len(payment_term_lines) > 1 or invoice.show_discount_details
else:
invoice.show_discount_details = False
invoice.show_payment_term_details = False
@api.depends('partner_id', 'invoice_source_email', 'partner_id.name')