Appending Email and Phone in Child Table

This commit is contained in:
Anupam K 2020-05-05 15:57:49 +05:30
parent 5e3d8050aa
commit d097eaef63

View File

@ -164,6 +164,8 @@ class Customer(TransactionBase):
contact.phone = lead.phone
contact.mobile_no = lead.mobile_no
contact.is_primary_contact = 1
contact.append('email_ids', dict(email_id=lead.email_id, is_primary=1))
contact.append('phone_nos', dict(phone=lead.mobile_no, is_primary_mobile_no=1))
contact.append('links', dict(link_doctype='Customer', link_name=self.name))
contact.flags.ignore_permissions = self.flags.ignore_permissions
contact.autoname()