RPC-Call: Error in Wizard Execute
I am using Tryton 7.0 and a web-app that uses RPC-Call.
The web-app works fine with Tryton. Since switching to Tryton 7, I can’t manage the wizards via RPC-Call in PHP.
I don’t get errors in creating and deleting wizards.
I get errors in the execute. Here is an example:
RPC-Call:
$context_mod = array_merge($context,[ 'active_id'=>13, 'active_ids'=>[13], 'active_model'=>'stock.digivoucher', 'action_id'=>624 ]);
$execute_wizard = $rpcClient->cl('wizard.stock.digivoucher.planned_date.define.execute', [41776, ['start'=>['comment'=>'', 'date'=>'2025-02-12']], 'define', $context_mod]);
Error:
Array
(
[state] =>
[result] => Array
(
[0] => 'str' object cannot be interpreted as an integer
[1] => Traceback (most recent call last):
File "/core/trytond/trytond/wsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/trytond/trytond/protocols/dispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/trytond/trytond/wsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/trytond/trytond/protocols/wrappers.py", line 200, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/trytond/trytond/protocols/dispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/core/trytond/trytond/wizard/wizard.py", line 339, in execute
setattr(record, field, value)
File "/core/trytond/trytond/model/fields/field.py", line 403, in __set__
value = self._py_type(value)
^^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object cannot be interpreted as an integer
)
)
For date fields, I use the text format in all RPC-Calls and I have never had problems (e.g. “2025-02-13”).
Can you help me solve this problem? Thanks!