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

i create sale order with xmlrpc  w now i want create action_confirm().

how i can create this action

sale_id = models.execute_kw(db,uid,password,'sale.order','create',[vals])

sale_id.action_confirm()    not work 


アバター
破棄
最善の回答

Hello Mohamed,

Hope you doing good.

When you use XMLRPC and create a new record then it will returns the id of that record.
And if you want to call the method of object then you have to search the record it will returns the recordset and afterwards you can call the method of the object.

Find Code in comment.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

アバター
破棄

Here is the example:

sale_id = models.execute_kw(db,uid,password,'sale.order','create',[vals])

sale_rec = models.execute_kw(db, uid, password, 'res.partner', 'search', [[['id', '=', sale_id]]])

sale_rec.action_confirm()

関連投稿 返信 ビュー 活動
Odoo XMLRPC 解決済
1
10月 21
5268
1
9月 22
1921
3
7月 25
796
3
2月 25
3647
0
5月 24
46