IMP benefit
This commit is contained in:
parent
ca30929cb3
commit
b9b7afb394
|
|
@ -125,8 +125,8 @@ class Visit(models.Model):
|
|||
_("The email template 'Visit Location OTP Email' is missing. Please contact your administrator."))
|
||||
template.write({'email_to': self.benefit_id.email,
|
||||
'email_cc': self.env.user.company_id.hr_email or self.env.user.company_id.email,})
|
||||
email_values = {"email_from": self.env.user.company_id.hr_email or self.env.user.company_id.email,'auto_delete': True}
|
||||
template.with_context(lang=self.env.user.lang,mail_notify_force_send= False).send_mail(self.id, force_send=True,
|
||||
email_values = {"email_from": self.env.user.company_id.hr_email or self.env.user.company_id.email}
|
||||
template.with_context(lang=self.env.user.lang,tracking_disable=True).send_mail(self.id, force_send=True,
|
||||
raise_exception=False,email_values=email_values)
|
||||
elif self.benefit_id.contact_type == 'sms':
|
||||
if not self.benefit_id.sms_phone:
|
||||
|
|
@ -135,7 +135,7 @@ class Visit(models.Model):
|
|||
sms_template_id = self.env.ref('odex_benefit.visit_location_otp_sms_template')
|
||||
if not sms_template_id:
|
||||
raise UserError(_("The SMS template 'Visit Location OTP' is missing. Please contact your administrator."))
|
||||
self._message_sms_with_template(
|
||||
self.with_context(tracking_disable=True)._message_sms_with_template(
|
||||
template=sms_template_id,
|
||||
put_in_queue=False,
|
||||
partner_ids=self.benefit_id.partner_id.ids,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<field name="name">visit.location.kanban</field>
|
||||
<field name="model">visit.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="state">
|
||||
<kanban default_group_by="state" quick_create="false">
|
||||
<field name="name"/>
|
||||
<field name="color"/>
|
||||
<field name="visit_date"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue