unit or product could be None
issue2976 review659002 (transplanted from 5327df763ccb9aabccaca13742c85dbdb3de3b76)
This commit is contained in:
1 parent
2cb708d98f
commit
f3ca0d7708
1 file changed
+1
-1
+1
-1
@@ -1792,7 +1792,7 @@ class InvoiceLine(ModelSQL, ModelView):
|
||||
res[field] = getattr(self, field)
|
||||
|
||||
for field in ('unit', 'product', 'account'):
|
||||
res[field] = getattr(self, field).id
|
||||
res[field] = getattr(getattr(self, field), 'id', None)
|
||||
|
||||
res['taxes'] = []
|
||||
for tax in self.taxes:
|
||||
|
||||
Reference in new issue
Block a user