Hello. I'm trying to create a method that can send the quotation mail just without having the wizard to pop up, as if it was clicked on sent instantly (for example, for having the quotation mail sent and the sale marked as sent automatically due to an action without bypassing any action_quotation_send logic)
This code works but the mail sent lacks the text/plain and
text/html parts of the mail, only the
application/pdf is attached, so it seems that it is not rendering. I wonder why the mail is sent in that incomplete format.
action = order.action_quotation_send()
ctx = action['context']
mail_template = self.env['mail.template'].browse(ctx.get('default_template_id'))
if mail_template:
mail_template.send_mail(order.id, force_send=True)
if ctx.get('mark_so_as_sent'):
order.action_quotation_sent()
Any help is welcomed.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- 프로젝트
- MRP
신고된 질문입니다
2564
화면
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
|
3
7월 24
|
4556 | ||
|
|
0
6월 21
|
4140 | ||
|
|
10
12월 23
|
21662 | ||
|
|
2
11월 25
|
2259 | ||
|
|
1
11월 25
|
570 |