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
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
            
                2207
                
                    Visualizzazioni
                
            
        
    Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|  | 3 lug 24  | 4027 | ||
|  | 0 giu 21  | 3926 | ||
|  | 10 dic 23  | 21363 | ||
|  | 0 ott 24  | 1589 | ||
|  | 1 set 24  | 2215 | 
