From 57435c8068ecbe5ef7838a04541e7ed9aa621a30 Mon Sep 17 00:00:00 2001 From: cbeddies Date: Thu, 9 Jan 2025 17:28:00 -0500 Subject: [PATCH] [UPD] osi_quote_downpayment: add safety code to method --- osi_quote_downpayment/models/account_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osi_quote_downpayment/models/account_move.py b/osi_quote_downpayment/models/account_move.py index cbff7fa2..69d563ba 100644 --- a/osi_quote_downpayment/models/account_move.py +++ b/osi_quote_downpayment/models/account_move.py @@ -13,11 +13,11 @@ def action_post(self): for rec in self: downpayment_lines[rec.id] = {} for line in rec.invoice_line_ids: - if line and "Down payment" in line.name: + if line.name and "Down payment" in line.name: downpayment_lines[rec.id][line.id] = line.price_unit res = super().action_post() for rec in self: for line in rec.invoice_line_ids: - if line and "Down payment" in line.name: + if line.name and "Down payment" in line.name: downpayment_lines[rec.id][line.id] = line.price_unit return res