Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5519 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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?

Câu trả lời hay nhất

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.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 17
5816
3
thg 8 17
5854
2
thg 2 24
5532
0
thg 5 23
2385
1
thg 4 23
7637