fixes
diff --git a/.travis.yml b/.travis.yml
index e19a1dc..03e75b6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,14 +58,12 @@
- stage: test
script:
- set -e
- - bench execute erpnext.patches.v10_0.workflow_leave_application.execute
- bench run-tests
env: Server Side Test
- # stage
script:
- bench --verbose run-setup-wizard-ui-test
- bench execute erpnext.setup.utils.enable_all_roles_and_domains
- - bench execute erpnext.patches.v10_0.workflow_leave_application.execute
- bench run-ui-tests --app erpnext
env: Client Side Test
- # stage
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index a4e0d8d..c2d8326 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/hr/doctype/leave_application/leave_application.js
@@ -29,6 +29,7 @@
refresh: function(frm) {
if (frm.is_new()) {
+ frm.set_value("workflow_state", "Open");
frm.trigger("calculate_total_days");
}
},
diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json
index f70b1df..88b5a55 100644
--- a/erpnext/hr/doctype/leave_application/leave_application.json
+++ b/erpnext/hr/doctype/leave_application/leave_application.json
@@ -50,66 +50,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "default": "Open",
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Status",
- "length": 0,
- "no_copy": 1,
- "options": "Open\nApproved\nRejected",
- "permlevel": 1,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_12",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "leave_type",
"fieldtype": "Link",
"hidden": 0,
@@ -796,7 +736,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
- "modified": "2018-01-16 00:21:59.025871",
+ "modified": "2018-01-22 12:10:40.757274",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Application",
@@ -887,9 +827,9 @@
{
"amend": 1,
"apply_user_permissions": 0,
- "cancel": 0,
+ "cancel": 1,
"create": 0,
- "delete": 0,
+ "delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 81d8ce3..5be44af 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -24,6 +24,7 @@
return _("{0}: From {0} of type {1}").format(self.workflow_state, self.employee_name, self.leave_type)
def validate(self):
+ if self.get("__islocal"): self.workflow_state = 'Open'
if not getattr(self, "__islocal", None) and frappe.db.exists(self.doctype, self.name):
self.previous_doc = frappe.get_value(self.doctype, self.name, "leave_approver", as_dict=True)
else:
@@ -180,9 +181,9 @@
self.throw_overlap_error(d)
def throw_overlap_error(self, d):
- msg = _("Employee {0} has already applied for {1} between {2} and {3}").format(self.employee,
+ msg = _("Employee {0} has already applied for {1} between {2} and {3} : ").format(self.employee,
d['leave_type'], formatdate(d['from_date']), formatdate(d['to_date'])) \
- + """ <br><b><a href="#Form/Leave Application/{0}">{0}</a></b>""".format(d["name"])
+ + """ <b><a href="#Form/Leave Application/{0}">{0}</a></b>""".format(d["name"])
frappe.throw(msg, OverlapError)
def get_total_leaves_on_half_day(self):
diff --git a/erpnext/hr/doctype/leave_application/leave_application_list.js b/erpnext/hr/doctype/leave_application/leave_application_list.js
index fba7297..7798ae7 100644
--- a/erpnext/hr/doctype/leave_application/leave_application_list.js
+++ b/erpnext/hr/doctype/leave_application/leave_application_list.js
@@ -1,6 +1,5 @@
frappe.listview_settings['Leave Application'] = {
add_fields: ["workflow_state", "leave_type", "employee", "employee_name", "total_leave_days", "from_date", "to_date"],
- filters:[["workflow_state","!=", "Rejected"]],
get_indicator: function(doc) {
return [__(doc.workflow_state), frappe.utils.guess_colour(doc.workflow_state),
"workflow_state,=," + doc.workflow_state];
diff --git a/erpnext/patches/v10_0/workflow_leave_application.py b/erpnext/patches/v10_0/workflow_leave_application.py
index 4128631..0b13a31 100644
--- a/erpnext/patches/v10_0/workflow_leave_application.py
+++ b/erpnext/patches/v10_0/workflow_leave_application.py
@@ -48,4 +48,3 @@
}).insert(ignore_permissions=True)
frappe.db.sql("""update `tabLeave Application` set workflow_state = status""")
- # frappe.db.sql("""alter table `tabLeave Application` drop column status""")
diff --git a/erpnext/public/css/pos.css b/erpnext/public/css/pos.css
index bc81182..e2d301d 100644
--- a/erpnext/public/css/pos.css
+++ b/erpnext/public/css/pos.css
@@ -169,5 +169,8 @@
height: 60px;
}
.grand-total .grand-total-value {
- font-size: 24px;
+ font-size: 18px;
+}
+.rounded-total-value {
+ font-size: 18px;
}