changeset 6abc7e470419 in proteus:5.0
details: https://hg.tryton.org/proteus?cmd=changeset&node=6abc7e470419
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 536e83c64cd3 -r 6abc7e470419 proteus/__init__.py
--- a/proteus/__init__.py       Sun Jun 06 09:24:51 2021 +0200
+++ b/proteus/__init__.py       Sun Jun 06 09:37:01 2021 +0200
@@ -1289,6 +1289,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