From add2548b98f39d9e5ce695c56fed3bd92e7ee760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Sun, 25 Nov 2012 18:27:55 +0100 Subject: [PATCH] Compute purchase_lines moves as root review583004 (transplanted from f2483c051a157956f41ee6b84c043a2579dc7be1) --- invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invoice.py b/invoice.py index ce8b97852d..09b4ff7fef 100644 --- a/invoice.py +++ b/invoice.py @@ -48,6 +48,8 @@ class InvoiceLine(ModelSQL, ModelView): move_obj = self.pool.get('stock.move') currency_obj = self.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':