diff --git a/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_templates/whatsapp_templates.py b/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_templates/whatsapp_templates.py index b85437e..94a0c64 100644 --- a/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_templates/whatsapp_templates.py +++ b/frappe_whatsapp/frappe_whatsapp/doctype/whatsapp_templates/whatsapp_templates.py @@ -13,6 +13,8 @@ class WhatsAppTemplates(Document): """Create whatsapp template.""" + def autoname(self): + self.name = self.template_name.lower().replace(" ", "_") def validate(self): if not self.language_code or self.has_value_changed("language"):