Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion account_stock_anglo_saxon: compute with root purchase_lines and sale_lines (issue 581005)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
nicolas.evr...@b2ck.com  
View profile  
 More options Nov 13 2012, 5:12 am
From: nicolas.evr...@b2ck.com
Date: Tue, 13 Nov 2012 10:12:22 +0000
Local: Tues, Nov 13 2012 5:12 am
Subject: account_stock_anglo_saxon: compute with root purchase_lines and sale_lines (issue 581005)
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':


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.