Use list comprehension in Invoice._credit().

review644002
(transplanted from 321da7e76acd53dc728631d1094010c36acd7de0)
This commit is contained in:
Albert Cervera i Areny committed 2013-01-22 16:06:59 +01:00
1 parent adae29ed9c
commit e5b00c093d
1 file changed
+2 -2
+2 -2
View File
@@ -1797,8 +1797,8 @@ class InvoiceLine(ModelSQL, ModelView):
res[field] = getattr(getattr(self, field), 'id', None)
res['taxes'] = []
for tax in self.taxes:
res['taxes'].append(('add', tax.id))
if self.taxes:
res['taxes'].append(('add', [tax.id for tax in self.taxes]))
return res