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

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. 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Manually assign a quotation number แก้ไขแล้ว
3
ก.ค. 24
3097
0
มิ.ย. 21
3463
10
ธ.ค. 23
20748
0
ต.ค. 24
1086
1
ก.ย. 24
1640