Merge pull request #5629 from saurabh6790/erp_v7_fix
[Minor][fix] Holiday list message fix and company attr fix
This commit is contained in:
commit
6fa4ec15aa
@ -238,7 +238,7 @@ def get_holiday_list_for_employee(employee, raise_exception=True):
|
|||||||
holiday_list = frappe.db.get_value("Company", company, "default_holiday_list")
|
holiday_list = frappe.db.get_value("Company", company, "default_holiday_list")
|
||||||
|
|
||||||
if not holiday_list and raise_exception:
|
if not holiday_list and raise_exception:
|
||||||
frappe.throw(_('Please set a default Holiday List for Employee {0} or Company {0}').format(employee, company))
|
frappe.throw(_('Please set a default Holiday List for Employee {0} or Company {1}').format(employee, company))
|
||||||
|
|
||||||
return holiday_list
|
return holiday_list
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ from frappe.model.document import Document
|
|||||||
|
|
||||||
class Company(Document):
|
class Company(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
self.get("__onload").transactions_exist = self.check_if_transactions_exist()
|
self.get("__onload")["transactions_exist"] = self.check_if_transactions_exist()
|
||||||
|
|
||||||
def check_if_transactions_exist(self):
|
def check_if_transactions_exist(self):
|
||||||
exists = False
|
exists = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user