Been trying to auto validate invoices in odoo 10 via php for a while now with no success. Am using the below php code to validate
<?php
$url = 'http://localhost:8069';
$url_auth = $url . '/xmlrpc/2/common';
$url_exec = $url . '/xmlrpc/2/object';
$db = 'DATABASE';
$username = 'Username';
$password = 'Password';
require_once('ripcord/ripcord.php');
$common = ripcord::client($url_auth);
$uid = $common->authenticate($db, $username, $password, array());
$models = ripcord::client("$url/xmlrpc/2/object");
$invoice_model = 'account.invoice';
$id = $models->exec_workflow(
$db, $uid, $password,
'account.invoice',
'invoice_open',
2948 //invoice Id
);
print_r($id);
When I execute the above I get no results. No error message, nothing.
There is no method
invoice_open
inaccount.invoice
, but there is anaction_invoice_open
. Could you check it again?Ref: https://github.com/odoo/odoo/blob/10.0/addons/account/models/account_invoice.py#L576