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

Hello odoo community :)

I need some hints how to send an email to an customer using xmlrpc on python.

I've sucessfully created the the invoice and changed the state to open via:


saleOrderId = models.execute(database, uid, password, 'sale.order', 'create', {'partner_id': 957})

InvoiceIds = models.execute(database, uid, password, 'sale.order', 'action_invoice_create', [saleOrderId])

models.execute(database, uid, password, 'account.invoice', 'action_invoice_open', InvoiceIds)


but now I'm stucking on how to create and send the invoice to the customer.


Thank you

อวตาร
ละทิ้ง

guys, tell me if you found a way to send invoice via xmlrpc, especially with ripcord in PHP.. thanks

ผู้เขียน

Thank you for your answer. Is there an example how to compose an account invoice email with attachment and text and send this via xmlrpc?

คำตอบที่ดีที่สุด

Marc,

You may smartly use the 'send_mail' method of the code module by calling that method from xmlrpc. Sale Order and Invoice have already the similar functionality. Here you have to bypass what the wizard does.

Simply, pass the info to the mail.compose.message model's send_mail method with the right context value.

All the best.

Thanks.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 17
5679
XMLRPC create picklist in odoo 10 API แก้ไขแล้ว
3
ส.ค. 17
5741
2
ก.พ. 24
5304
0
พ.ค. 23
2240
1
เม.ย. 23
7513