From 084f05eea6b5e7fc41ee7266dd42ee4c65d0f8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 17 Sep 2014 21:45:12 +0200 Subject: [PATCH] Use context to check model and field access issue4081 review8481002 --- purchase.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index cb2d5e5f0c..eed89e94b2 100644 --- a/purchase.py +++ b/purchase.py @@ -162,8 +162,7 @@ class PurchaseLine: accounts = [] if not line.analytic_accounts: # Create missing selection - with Transaction().set_user(0): - selection, = Selection.create([{}]) + selection, = Selection.create([{}]) cls.write([line], { 'analytic_accounts': selection.id, })