changeset 9d8aeb52e308 in proteus:6.0
details: https://hg.tryton.org/proteus?cmd=changeset&node=9d8aeb52e308
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 622bd5ba0f65 -r 9d8aeb52e308 proteus/__init__.py
--- a/proteus/__init__.py Sat May 15 22:35:43 2021 +0200
+++ 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':