def onload(self): '''load account name for General Ledger Report''' account = self.account or get_warehouse_account(self) if account: self.set_onload('account', account) load_address_and_contact(self)
def onload(self): '''load account name for General Ledger Report''' account = self.account or get_warehouse_account(self.name, self.company) if account: self.set_onload('account', account) load_address_and_contact(self)
def onload(self): '''load account name for General Ledger Report''' if self.company and cint(frappe.db.get_value("Company", self.company, "enable_perpetual_inventory")): account = self.account or get_warehouse_account(self) if account: self.set_onload('account', account) load_address_and_contact(self)
def onload(self): customer = frappe.db.get_value("Customer", {"lead_name": self.name}) self.get("__onload").is_customer = customer load_address_and_contact(self) contact_list = [] # if self.doctype != "Lead": filters = [ ["Dynamic Link", "link_doctype", "=", self.doctype], ["Dynamic Link", "link_name", "=", self.name], ["Dynamic Link", "parenttype", "=", "Contact"], ] contact_list = frappe.get_all("Contact", filters=filters, fields=["*"]) contact_list = sorted( contact_list, lambda a, b: (int(a.is_primary_contact - b.is_primary_contact)) or (1 if a.modified - b.modified else 0), reverse=True) # print "************************************" # print contact_list self.set_onload('contact_list', contact_list)
def onload(self): load_address_and_contact(self)
def onload(self): customer = frappe.db.get_value("Customer", {"lead_name": self.name}) self.get("__onload").is_customer = customer load_address_and_contact(self)
def onload(self): load_address_and_contact(self, "company") self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
def mn_onload(self, method): """Load address and contacts in `__onload`""" load_address_and_contact(self)
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self) self.load_dashboard_info()
def onload(self): customer = frappe.db.get_value("Customer", {"lead_name": self.name}) self.get("__onload").is_customer = customer load_address_and_contact(self, "lead")
def onload(self): load_address_and_contact(self) if self.customer: self.set_onload("dashboard_info", get_dashboard_info("Customer", self.customer))
def onload(self): load_address_and_contact(self, "company")
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self)
def onload(self): load_address_and_contact(self) self.load_subscription_details()
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "sales_partner")