Example #1
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)
Example #2
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)
Example #3
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)
Example #4
0
def get_inventory_account(company, warehouse=None):
    account = None
    if warehouse:
        account = get_warehouse_account(frappe.get_doc("Warehouse", warehouse))
    else:
        account = get_company_default_inventory_account(company)

    return account
Example #5
0
def get_inventory_account(company, warehouse=None):
	account = None
	if warehouse:
		account = get_warehouse_account(warehouse, company)
	else:
		account = get_company_default_inventory_account(company)

	return account
Example #6
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)
Example #7
0
def get_inventory_account(company, warehouse=None):
    account = None
    if warehouse:
        account = get_warehouse_account(warehouse, company)
    else:
        account = get_company_default_inventory_account(company)

    return account
Example #8
0
def get_inventory_account(company, warehouse=None):
	account = None
	if warehouse:
		account = get_warehouse_account(frappe.get_doc("Warehouse", warehouse))
	else:
		account = get_company_default_inventory_account(company)

	return account