Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4601 Weergaven

Hello,

I'm trying to call an automated from a php script:

  $call = $models->execute_kw($db, $uid, $password,

'ir.actions.server',

'run',

array(array(id of the server action), array(array('id', '=', object_id))));

I have the following error:

File "/usr/lib/python2.7/site-packages/odoo/models.py", line 4890, in with_context
context = dict(args[0] if args else self._context, **kwargs)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

Any idea of the good syntax to call a server action from the webservice ?
Thanks
Avatar
Annuleer
Auteur Beste antwoord

I found it by myself !
It works but it returns False !

This is the the call. Any idea why it returns False ?

  $call = $models->execute_kw($db, $uid, $password,

'ir.actions.server',

'run',

array(1644),

array('context' => array(

'active_id' => 10072,

'active_model' => 'crm.lead',

)));


 Thanks
Mofel

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jun. 23
3786
0
mrt. 15
4391
0
mrt. 23
1769
0
jul. 21
4427
1
jan. 21
5110