コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
8316 ビュー

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. 

アバター
破棄
著作者 最善の回答

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.



アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
6月 21
3385
3
7月 24
2893
1
11月 18
3618
2
11月 16
3297
0
4月 24
1419