Merge github.com:frappe/erpnext into develop

This commit is contained in:
Nabin Hait 2014-03-26 10:23:53 +05:30
commit 3a70ba3ba1
3 changed files with 5 additions and 5 deletions

View File

@ -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")

View File

@ -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

View File

@ -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()