Use list comprehension in Invoice._credit().
review644002 (transplanted from 321da7e76acd53dc728631d1094010c36acd7de0)
This commit is contained in:
1 parent
adae29ed9c
commit
e5b00c093d
1 file changed
+2
-2
+2
-2
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user