From d3188a29a7f631df1b1e6cb17ae98258bae59b63 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 3 Oct 2014 17:01:36 +0200 Subject: [PATCH] The 'lines' argument can be False so we can't loop --- crm_claim_rma/crm_claim_rma.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crm_claim_rma/crm_claim_rma.py b/crm_claim_rma/crm_claim_rma.py index fc086c09..5f9fe4f4 100644 --- a/crm_claim_rma/crm_claim_rma.py +++ b/crm_claim_rma/crm_claim_rma.py @@ -601,7 +601,8 @@ class crm_claim(orm.Model): line.update(warranty_values(invoice_line.invoice_id, invoice_line.product_id)) claim_lines.append(line) - else: # happens when the date, warehouse or claim type is modified + elif lines: # happens when the date, warehouse or claim type is + # modified for command in lines: code = command[0] assert code != 6, "command 6 not supported in on_change"