26 lines
958 B
Diff
26 lines
958 B
Diff
diff -r cc988ec8da34 trytond/trytond/protocols/dispatcher.py
|
|
--- a/trytond/trytond/protocols/dispatcher.py Mon Apr 23 17:12:37 2018 +0200
|
|
+++ b/trytond/trytond/protocols/dispatcher.py Fri May 11 12:53:17 2018 +0200
|
|
@@ -122,8 +122,19 @@
|
|
type, _ = method.split('.', 1)
|
|
name = '.'.join(method.split('.')[1:-1])
|
|
method = method.split('.')[-1]
|
|
- return pool.get(name, type=type), method
|
|
-
|
|
+ try:
|
|
+ obj = pool.get(name, type=type)
|
|
+ except KeyError:
|
|
+ if name[:15] == 'babi_execution_':
|
|
+ with Transaction().start(pool.database_name, request.user_id,
|
|
+ readonly=False):
|
|
+ Execution = pool.get('babi.report.execution')
|
|
+ execution = Execution(int(name[15:]))
|
|
+ execution.validate_model()
|
|
+ obj = pool.get(name, type=type)
|
|
+ else:
|
|
+ raise
|
|
+ return obj, method
|
|
|
|
@app.auth_required
|
|
@with_pool
|