changeset e2f2354a94a8 in proteus:5.8
details: https://hg.tryton.org/proteus?cmd=changeset&node=e2f2354a94a8
description:
Support action with integer res_id
issue10472
review340891002
(grafted from 313d87ed896aa12656864ebda27902e50d5e06bf)
diffstat:
proteus/__init__.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r 8e908943e2b0 -r e2f2354a94a8 proteus/__init__.py
--- a/proteus/__init__.py Fri Jan 01 16:15:09 2021 +0100
+++ b/proteus/__init__.py Sun Jun 06 09:37:01 2021 +0200
@@ -1328,6 +1328,8 @@
with config.reset_context(), config.set_context(action_ctx):
if res_id is None:
return Model_.find(domain)
+ elif isinstance(res_id, int):
+ return [Model_(res_id)]
else:
return [Model_(id_) for id_ in res_id]
elif action['type'] == 'ir.action.wizard':