Exemplo n.º 1
0
	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)
Exemplo n.º 2
0
	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)
Exemplo n.º 3
0
	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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
 def onload(self):
     load_address_and_contact(self)
Exemplo n.º 6
0
 def onload(self):
     customer = frappe.db.get_value("Customer", {"lead_name": self.name})
     self.get("__onload").is_customer = customer
     load_address_and_contact(self)
Exemplo n.º 7
0
	def onload(self):
		load_address_and_contact(self, "company")
		self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
Exemplo n.º 8
0
	def onload(self):
		load_address_and_contact(self, "company")
		self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
Exemplo n.º 9
0
def mn_onload(self, method):
    """Load address and contacts in `__onload`"""
    load_address_and_contact(self)
Exemplo n.º 10
0
 def onload(self):
     """Load address and contacts in `__onload`"""
     load_address_and_contact(self)
     self.load_dashboard_info()
Exemplo n.º 11
0
	def onload(self):
		load_address_and_contact(self)
Exemplo n.º 12
0
	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")
Exemplo n.º 13
0
 def onload(self):
     load_address_and_contact(self)
     if self.customer:
         self.set_onload("dashboard_info",
                         get_dashboard_info("Customer", self.customer))
Exemplo n.º 14
0
 def onload(self):
     load_address_and_contact(self, "company")
Exemplo n.º 15
0
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self)
Exemplo n.º 16
0
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self)
		self.load_dashboard_info()
Exemplo n.º 17
0
 def onload(self):
     load_address_and_contact(self)
     self.load_subscription_details()
Exemplo n.º 18
0
 def onload(self):
     """Load address and contacts in `__onload`"""
     load_address_and_contact(self)
Exemplo n.º 19
0
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self, "sales_partner")