def on_update(self): if not self.naming_series: self.naming_series = '' self.update_address() self.update_contact() # create account head create_party_account(self.name, "Supplier", self.company) # update credit days and limit in account self.update_credit_days_limit()
def on_update(self): self.validate_name_with_customer_group() self.update_lead_status() self.update_address() self.update_contact() # create account head create_party_account(self.doc.name, "Customer", self.doc.company) # update credit days and limit in account self.update_credit_days_limit() #create address and contact from lead self.create_lead_address_contact()
def on_update(self): self.validate_name_with_customer_group() self.update_lead_status() self.update_address() self.update_contact() # create account head create_party_account(self.name, "Customer", self.company) # update credit days and limit in account self.update_credit_days_limit() #create address and contact from lead self.create_lead_address_contact()
def get_party_account(company, party, party_type): acc_head = frappe.db.get_value("Account", { "master_name": party, "master_type": party_type, "company": company }) if not acc_head: print "missing act head" from stdlogger import root root.debug({ "master_name": party, "master_type": party_type, "company": company }) from erpnext.accounts.party import create_party_account acc_head = create_party_account(party, party_type, company) return acc_head