Use context to check model and field access

issue4081
review8481002
This commit is contained in:
Cédric Krier committed 2014-09-17 21:45:12 +02:00
1 parent d372925ba1
commit 084f05eea6
1 file changed
+1 -2
+1 -2
View File
@@ -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,
})