changeset 313d87ed896a in proteus:default
details: https://hg.tryton.org/proteus?cmd=changeset&node=313d87ed896a
description:
        Support action with integer res_id

        issue10472
        review340891002
diffstat:

 proteus/__init__.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r da09edb248ee -r 313d87ed896a proteus/__init__.py
--- a/proteus/__init__.py       Wed May 05 16:01:35 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':

Reply via email to