콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5481 화면

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
5764
3
8월 17
5809
2
2월 24
5430
0
5월 23
2328
1
4월 23
7595