Hi Community,
I want to send email after some delay(dynamic) means i have requirement that email should be trigger by delay and this is delay dynamic eg. for first email will trigger after 10 min when change stage and another may be some different time that we will manage in configuration.
So, how can i achieve this? Is there is any option odoo by which we can control datetime for email trigger by template or python function?
Now i try to achieve this by cron job but it not fulfill my requirement.
My python code is below:
partner = self.create_user_id.partner_id if partner and customer_survey and auto_assign_survey and not self.response: survey_response = self.env['survey.user_input'].create({'survey_id': customer_survey, 'partner_id': partner.id, 'email': partner.email or None}) survey_response.generate_public_url() survey_response.write({'helpdesk_ticket': self.id}) self.write({'response': survey_response.id}) if follow_up_template: follow_up_template.sudo().write({'email_to': partner.email}) self.env['mail.template'].browse(follow_up_template.id).send_mail(self.id, force_send=False) if ir_cron_customize: self.env['ir.cron'].browse(ir_cron_customize.id).write( {'nextcall': datetime.datetime.now() + datetime.timedelta(minutes = 5)})i am using odoo version-11Thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Projeto
- MRP
Esta pergunta foi sinalizada
3069
Visualizações
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
1
abr. 23
|
4558 | ||
|
|
1
out. 20
|
8752 | ||
|
|
1
jun. 15
|
6398 | ||
|
Set-up Outgoing Mail Server Odoo
Resolvido
|
|
4
jun. 24
|
3546 | |
|
|
0
jul. 22
|
2797 |