This question has been flagged

require_once('ripcord/ripcord.php');

$common = ripcord::client($url.'/xmlrpc/2/common');

$uid = $common->authenticate($db, $username, $password, array());

$models = ripcord::client("$url/xmlrpc/2/object");

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

    'sale.order', 'action_button_confirm',

     array(array(25918))); //Quotation ID here

var_dump($sales_order);


am getting the error as 

website_sale_autopay_models.py", line 29, in action_button_confirm if (r.payment_tx_id and r.payment_tx_id.state == 'done' and r.payment_acquirer_id) or (context.get('is_sale_order')): AttributeError: 'NoneType' object has no attribute 'get' ".

While this code is running fine on different database. 

Avatar
Discard
Author Best Answer

Thanks for your valuable reply. I have tried the same as you have assisted, But it is not working for me.. 

$sales_order = $models->exec_workflow($db, $uid, $password,

'sale.order', 'action_button_confirm',25931);  //Sales Order ID

var_dump($sales_order);
I am getting the result as "bool(false)" while Manualy the button is working fine. Kindly help to solve it.



Avatar
Discard
Best Answer

you will confirm sale order by xmlrpc using below code. Here sale_order_id is the id of the sale order, that you get when creating the sale order.By executing code, the Quotation convert into sale order.
You may refer the answer given by Nilesh Sheliya in (Stack overflow . com) for more details for the same query.

Avatar
Discard