Reviewers: ,
Please review this at
http://codereview.tryton.org/581005/
Affected files:
M invoice.py
Index: invoice.py
===================================================================
--- a/invoice.py
+++ b/invoice.py
@@ -4,6 +4,7 @@
import operator
from trytond.model import ModelView, ModelSQL
from trytond.pool import Pool
+from trytond.transaction import Transaction
class InvoiceLine(ModelSQL, ModelView):
@@ -49,6 +50,8 @@
move_obj = pool.get('stock.move')
currency_obj = pool.get('currency.currency')
+ with Transaction().set_user(0, set_context=True):
+ line = self.browse(
line.id)
result = super(InvoiceLine, self).get_move_line(line)
if line.type != 'line':