Example #1
0
	def on_trash(self):
		if self.customer_primary_contact:
			frappe.db.sql("""update `tabCustomer`
				set customer_primary_contact=null, mobile_no=null, email_id=null
				where name=%s""", self.name)

		delete_contact_and_address('Customer', self.name)
		if self.lead_name:
			frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
Example #2
0
	def on_trash(self):
		if self.customer_primary_contact:
			frappe.db.sql("""update `tabCustomer`
				set customer_primary_contact=null, mobile_no=null, email_id=null
				where name=%s""", self.name)

		delete_contact_and_address('Customer', self.name)
		if self.lead_name:
			frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
Example #3
0
    def on_trash(self):
        if self.supplier_primary_contact:
            frappe.db.sql(
                """
				UPDATE `tabSupplier`
				SET
					supplier_primary_contact=null,
					supplier_primary_address=null,
					mobile_no=null,
					email_id=null,
					primary_address=null
				WHERE name=%(name)s""", {"name": self.name})

        delete_contact_and_address('Supplier', self.name)
Example #4
0
	def on_trash(self):
		if self.customer_primary_contact:
			frappe.db.sql("""
				UPDATE `tabCustomer`
				SET
					customer_primary_contact=null,
					customer_primary_address=null,
					mobile_no=null,
					email_id=null,
					primary_address=null
				WHERE name=%(name)s""", {"name": self.name})

		delete_contact_and_address('Customer', self.name)
		if self.lead_name:
			frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
Example #5
0
 def on_trash(self):
     delete_contact_and_address('Retailer', self.name)
	def on_trash(self):
		delete_contact_and_address('Healthcare Practitioner', self.name)
Example #7
0
def mn_on_trash(self, method):
    delete_contact_and_address('Manufacturer', self.name)
Example #8
0
 def on_trash(self):
     delete_contact_and_address('Supplier', self.name)
Example #9
0
	def on_trash(self):
		delete_contact_and_address('Customer', self.name)
		if self.lead_name:
			frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
Example #10
0
 def on_trash(self):
     delete_contact_and_address("BankAccount", self.name)
Example #11
0
def on_trash(self,method):
    delete_contact_and_address('Institute', self.name)
Example #12
0
	def on_trash(self):
		delete_contact_and_address('Patient', self.name)
Example #13
0
	def on_trash(self):
		delete_contact_and_address('BankAccount', self.name)
Example #14
0
	def on_trash(self):
		delete_contact_and_address('Bank', self.name)
Example #15
0
 def on_trash(self):
     delete_contact_and_address('Gym Member', self.name)
Example #16
0
 def on_trash(self):
     # clears notification_contact for LinkExistsException
     self.db_set("notification_contact", None)
     self.db_set("emergency_contact", None)
     delete_contact_and_address("Gym Member", self.name)
Example #17
0
 def on_trash(self):
     delete_contact_and_address('Buisness Unit', self.name)
     if frappe.db.exists("Customer", self.bu_name):
         frappe.delete_doc("Customer",
                           frappe.db.exists("Customer", self.bu_name))
Example #18
0
	def on_trash(self):
		delete_contact_and_address('Customer', self.name)
		if self.lead_name:
			frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
Example #19
0
	def on_trash(self):
		if self.customer:
			delete_contact_and_address('Customer', self.customer)
		else:
			delete_contact_and_address('Fachkontakt', self.name)
 def on_trash(self):
     delete_contact_and_address('Healthcare Practitioner', self.name)
Example #21
0
	def on_trash(self):
		delete_contact_and_address('Supplier', self.name)
Example #22
0
	def on_trash(self):
		delete_contact_and_address('Shareholder', self.name)
Example #23
0
	def on_trash(self):
		delete_contact_and_address('Shareholder', self.name)
Example #24
0
 def on_trash(self):
     delete_contact_and_address('Physician', self.name)
Example #25
0
 def on_trash(self):
     delete_contact_and_address('kis Practitioner', self.name)