|
@@ -34,7 +34,7 @@ class res_partner_birthday(models.Model):
|
|
def send_whatsapp_msg(self):
|
|
def send_whatsapp_msg(self):
|
|
company = self.env.user.company_id
|
|
company = self.env.user.company_id
|
|
if self.partner_id.mobile:
|
|
if self.partner_id.mobile:
|
|
- mensaje = "Feliz cumpleaños.! Que tengas un hermoso día. Te deseamos desde " + str(company.name)
|
|
|
|
|
|
+ mensaje = "Feliz cumpleaños.! Muchas felicidades de parte de todo el equipo de " + str(company.name)
|
|
mensaje_no_space = "%20".join(mensaje.split())
|
|
mensaje_no_space = "%20".join(mensaje.split())
|
|
url = "https://api.whatsapp.com/send?phone=" + str(self.partner_id.mobile) + "&text=" + mensaje_no_space
|
|
url = "https://api.whatsapp.com/send?phone=" + str(self.partner_id.mobile) + "&text=" + mensaje_no_space
|
|
return {'type': 'ir.actions.act_url', 'url': url, 'target': 'new'}
|
|
return {'type': 'ir.actions.act_url', 'url': url, 'target': 'new'}
|