跳至內容
選單
此問題已被標幟
1 回覆
5411 瀏覽次數

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.


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
10月 17
5664
3
8月 17
5730
2
2月 24
5284
0
5月 23
2228
1
4月 23
7499