Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
8315 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
июн. 21
3385
3
июл. 24
2893
1
нояб. 18
3618
2
нояб. 16
3297
0
апр. 24
1419