Merge github.com:frappe/erpnext into develop
This commit is contained in:
commit
3a70ba3ba1
@ -66,7 +66,7 @@ class DocType(DocListController):
|
||||
self.add_restriction_if_required("Leave Application", user)
|
||||
|
||||
def add_restriction_if_required(self, doctype, user):
|
||||
if frappe.permissions.has_only_non_restrict_role(frappe.get_doctype(doctype), user) \
|
||||
if frappe.permissions.has_only_non_restrict_role(doctype, user) \
|
||||
and self.doc.name not in get_restrictions(user).get("Employee", []):
|
||||
|
||||
frappe.defaults.add_default("Employee", self.doc.name, user, "Restriction")
|
||||
|
@ -13,8 +13,8 @@ class TestTimeLog(unittest.TestCase):
|
||||
|
||||
test_records = [[{
|
||||
"doctype": "Time Log",
|
||||
"from_time": "2013-01-01 10:00:00",
|
||||
"to_time": "2013-01-01 11:00:00",
|
||||
"from_time": "2013-01-01 10:00:00.000000",
|
||||
"to_time": "2013-01-01 11:00:00.000000",
|
||||
"activity_type": "_Test Activity Type",
|
||||
"note": "_Test Note",
|
||||
"docstatus": 1
|
||||
|
@ -8,8 +8,8 @@ class TimeLogBatchTest(unittest.TestCase):
|
||||
from erpnext.projects.doctype.time_log.test_time_log import test_records as time_log_records
|
||||
time_log = frappe.bean(copy=time_log_records[0])
|
||||
time_log.doc.fields.update({
|
||||
"from_time": "2013-01-02 10:00:00",
|
||||
"to_time": "2013-01-02 11:00:00",
|
||||
"from_time": "2013-01-02 10:00:00.000000",
|
||||
"to_time": "2013-01-02 11:00:00.000000",
|
||||
"docstatus": 0
|
||||
})
|
||||
time_log.insert()
|
||||
|
Loading…
x
Reference in New Issue
Block a user