account_stock_anglo_saxon: compute with root purchase_lines and sale_lines (issue 581005)

7 views
Skip to first unread message

nicolas...@b2ck.com

unread,
Nov 13, 2012, 5:12:22 AM11/13/12
to nicolas...@b2ck.com, re...@tryton-rietveld-hrd.appspotmail.com, tryto...@googlegroups.com
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':



Reply all
Reply to author
Forward
0 new messages