Crash when user add actions that has not permisions
Scenario:
- Default Statement report has "account" group.
- Creatre new user:
- Groups: Not account group
- Actions: add the "Statement" report
When try the user to login:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/dispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/wsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/wrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/dispatcher.py", line 209, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/ir/action.py", line 144, in get_action_value
return self.get_action_values(
^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/ir/action.py", line 134, in get_action_values
actions = Action.read(action_ids, columns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/model/modelsql.py", line 1054, in read
red_sql = reduce_ids(table.id, sub_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/tools/misc.py", line 119, in reduce_ids
ids = list(map(strict_int, ids))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/tools/misc.py", line 116, in strict_int
return int(value)
^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
get_action_id() return None and finally crash when Action.read([None]).