Use context to check model and field access
issue4081 review8481002
This commit is contained in:
1 parent
d372925ba1
commit
084f05eea6
1 file changed
+1
-2
+1
-2
@@ -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,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user