def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "customer") import time todays_date = datetime.datetime.strptime(cstr(nowdate()),'%Y-%m-%d') # Show popup if financial data is not updated after the 6 month of every fiscal year. if todays_date.month > 6: self.get_financial_data()
def onload(self): load_address_and_contact(self, "customer") billed_qty = frappe.db.sql( """select sum(ifnull(qty, 0)) from `tabSales Invoice Item` where docstatus=1 and delivery_note=%s""", self.name) if billed_qty: total_qty = sum( (item.qty for item in self.get("delivery_note_details"))) self.get("__onload").billing_complete = ( billed_qty[0][0] == total_qty)
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 contacts in `__onload`""" load_address_and_contact(self, "customer")
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "supplier") self.load_dashboard_info()
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "organisation")
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "customer") self.load_dashboard_info()
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "supplier")
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "sales_partner")
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "supplier") self.set_onload('links', self.meta.get_links_setup())
def onload(self): """Load address and contacts in `__onload`""" load_address_and_contact(self, "customer") self.set_onload('links', self.meta.get_links_setup())