Tips on how to stop following a partner when it is created using php and ripcord?
I tried this:
$models = ripcord::client($url.'/xmlrpc/2/object');
$vals = array(
'name' => 'Test',
'mail_create_nosubscribe' => true
);
$partner_id = $models->execute_kw($db, $uid, $password, 'res.partner', 'create', array($vals));
but it did not work.
I'll use the example from the official documentation:
The only expected argument for
createis the set of values for creating a single record. These creation values should be formatted as a Python dictionary, and execute_kw anticipates Python arguments as a list. Consequently, an array of arrays is expected in PHP.However, in certain methods, keyword arguments are also anticipated. To include or modify the context, you also can use keyword arguments in execute_kw. Odoo expects the context to be specified as a keyword, with a dictionary in Python or an array in PHP as its corresponding value.