The 'lines' argument can be False so we can't loop

This commit is contained in:
Guewen Baconnier
2014-10-03 17:01:36 +02:00
parent 270100acb3
commit d3188a29a7

View File

@@ -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"