コード例 #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)
コード例 #2
0
ファイル: warehouse.py プロジェクト: kalisetti/erpnext
	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)
コード例 #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)
コード例 #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)
コード例 #5
0
 def onload(self):
     load_address_and_contact(self)
コード例 #6
0
ファイル: lead.py プロジェクト: Vishalcse/erpnextv13beta
 def onload(self):
     customer = frappe.db.get_value("Customer", {"lead_name": self.name})
     self.get("__onload").is_customer = customer
     load_address_and_contact(self)
コード例 #7
0
ファイル: company.py プロジェクト: ravik0007/erpnext
	def onload(self):
		load_address_and_contact(self, "company")
		self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
コード例 #8
0
	def onload(self):
		load_address_and_contact(self, "company")
		self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
コード例 #9
0
ファイル: api.py プロジェクト: finbyz/hemtech
def mn_onload(self, method):
    """Load address and contacts in `__onload`"""
    load_address_and_contact(self)
コード例 #10
0
 def onload(self):
     """Load address and contacts in `__onload`"""
     load_address_and_contact(self)
     self.load_dashboard_info()
コード例 #11
0
	def onload(self):
		load_address_and_contact(self)
コード例 #12
0
ファイル: lead.py プロジェクト: Aptitudetech/ERPNext
	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")
コード例 #13
0
ファイル: booking_party.py プロジェクト: libermatic/gg_custom
 def onload(self):
     load_address_and_contact(self)
     if self.customer:
         self.set_onload("dashboard_info",
                         get_dashboard_info("Customer", self.customer))
コード例 #14
0
 def onload(self):
     load_address_and_contact(self, "company")
コード例 #15
0
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self)
コード例 #16
0
ファイル: customer.py プロジェクト: Aptronics/erpnext
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self)
		self.load_dashboard_info()
コード例 #17
0
 def onload(self):
     load_address_and_contact(self)
     self.load_subscription_details()
コード例 #18
0
 def onload(self):
     """Load address and contacts in `__onload`"""
     load_address_and_contact(self)
コード例 #19
0
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self, "sales_partner")