Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3331 มุมมอง

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()

Related Posts ตอบกลับ มุมมอง กิจกรรม
Odoo XMLRPC แก้ไขแล้ว
1
ต.ค. 21
5099
1
ก.ย. 22
1903
3
ก.ค. 25
768
3
ก.พ. 25
3596
0
พ.ค. 24
46