Creating a Scheduler. This will create a scheduler view. You can see this under settings->Automation -> scheduled action
<record id="ir_send_mail_cron_scheduler_action" model="ir.cron">
<field name="name">Followup Mail scheduler</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'crm.lead'" name="model"/>
<field eval="'send_followup_mail'" name="function"/>
</record>
crm.lead 개체에서 템플릿을 호출 할 수있는 함수를 만들어야합니다. 그 전에는 이메일 템플리트를 첨부 할 수 있도록 1 2 개의 필드가 있습니다.
@api.multi
def send_followup_mail(self):
# write your logic to find the time intervals(day 1, day 2, week)
# based on the time interval trigger the mails.
# use a loop to get the mail template id from the one2many
mail_template = self.env['mail.template'].browse(template_id)
mail_template.write({'email_to': self.email})
#this will trigger the mail
if mail_template:
mail_template.send_mail(self.id, force_send=True, raise_exception=True)
출처
2017-09-19 11:45:38
sfx
답변 해 주셔서 감사합니다. 생성 된 리드에서 일련의 전자 메일 발송을 시작하는 방법을 알려주시겠습니까? odoo CRM에서 리드를 생성한다고 가정 해 봅시다. 지금부터 1 일, 3 일, 1 주, 1 개월 후에 일련의 이메일을 보내는 자동화를 어떻게 만듭니 까? –