mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
In babi_multiprocess.diff, add another patch to prevent crash when reference
fields check that the user has access rights to all models the field can point to. ir.attachment's resource field, for example, can refer to any model in Tryton but babi's models may not be registered so we prevent checking permissions on babi_execution_* models.
This commit is contained in:
parent
0a3fcdaa1a
commit
22e099a984
1 changed files with 16 additions and 0 deletions
|
@ -23,3 +23,19 @@
|
|||
|
||||
@app.auth_required
|
||||
@with_pool
|
||||
diff -r d875ab180d75 trytond/ir/model.py
|
||||
--- a/trytond/trytond/ir/model.py Mon May 06 14:45:35 2019 +0200
|
||||
+++ b/trytond/trytond/ir/model.py Wed May 22 00:18:59 2019 +0200
|
||||
@@ -587,8 +587,9 @@
|
||||
# XXX Can not check access right on instance method
|
||||
selection = []
|
||||
for model_name, _ in selection:
|
||||
- if model_name and not cls.check(model_name, mode=mode,
|
||||
- raise_exception=False):
|
||||
+ if (model_name and not model_name.startswith('babi_execution_')
|
||||
+ and not cls.check(model_name, mode=mode,
|
||||
+ raise_exception=False)):
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
|
||||
|
|
Loading…
Reference in a new issue