cost_line could be empty dictionary if there is no cost

(transplanted from ebb11dd2659394e1fca65c231a3647c1a4647d76)
This commit is contained in:
Cédric Krier committed 2011-12-06 19:45:53 +01:00
1 parent 59a7fccedd
commit 93a68fcd15
1 file changed
+1 -1
+1 -1
View File
@@ -154,7 +154,7 @@ class Sale(Model):
values['lines'] = []
for line in values['lines']:
if line.get('shipment_cost'):
if line['shipment_cost'] != cost_line['shipment_cost']:
if line['shipment_cost'] != cost_line.get('shipment_cost'):
to_remove = line['id']
values['lines'].remove(line)
if cost_line: