تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
8311 أدوات العرض

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
يونيو 21
3377
3
يوليو 24
2892
1
نوفمبر 18
3618
2
نوفمبر 16
3297
0
أبريل 24
1416