From 94e14257fba5d759106999cd32895540e6d98ab9 Mon Sep 17 00:00:00 2001 From: Er-Naren719 <49683121+Er-Naren719@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:46:47 +0530 Subject: [PATCH 1/7] feat: column width increased for view attachments field (#314) --- erpnext/projects/doctype/project_user/project_user.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/project_user/project_user.json b/erpnext/projects/doctype/project_user/project_user.json index f0a70dd1df..2f452cc2d7 100644 --- a/erpnext/projects/doctype/project_user/project_user.json +++ b/erpnext/projects/doctype/project_user/project_user.json @@ -1,4 +1,5 @@ { + "actions": [], "creation": "2016-03-25 02:52:19.283003", "doctype": "DocType", "editable_grid": 1, @@ -46,6 +47,7 @@ "fetch_from": "user.full_name", "fieldname": "full_name", "fieldtype": "Read Only", + "in_list_view": 1, "label": "Full Name" }, { @@ -55,7 +57,7 @@ "label": "Welcome email sent" }, { - "columns": 1, + "columns": 2, "default": "0", "fieldname": "view_attachments", "fieldtype": "Check", @@ -74,7 +76,8 @@ } ], "istable": 1, - "modified": "2019-07-15 19:37:26.942294", + "links": [], + "modified": "2020-02-09 23:26:50.321417", "modified_by": "Administrator", "module": "Projects", "name": "Project User", From 21d662f96ddb382f4582e34aa90f8da7b012f09b Mon Sep 17 00:00:00 2001 From: Anuradha Kalaskar Date: Sat, 15 Feb 2020 13:17:57 +0530 Subject: [PATCH 2/7] fix: to date cannot be less than from date validation on student leave application --- .../student_leave_application.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application.py b/erpnext/education/doctype/student_leave_application/student_leave_application.py index b3e71a2b08..410f0cca3f 100644 --- a/erpnext/education/doctype/student_leave_application/student_leave_application.py +++ b/erpnext/education/doctype/student_leave_application/student_leave_application.py @@ -7,9 +7,11 @@ import frappe from frappe import _ from frappe.utils import get_link_to_form from frappe.model.document import Document +from frappe import throw, _ class StudentLeaveApplication(Document): def validate(self): + self.validate_dates() self.validate_duplicate() def validate_duplicate(self): @@ -29,4 +31,8 @@ class StudentLeaveApplication(Document): if data: link = get_link_to_form("Student Leave Application", data[0].name) frappe.throw(_("Leave application {0} already exists against the student {1}") - .format(link, self.student)) \ No newline at end of file + .format(link, self.student)) + + def validate_dates(self): + if self.to_date < self.from_date : + throw(_("To Date cannot be less than From Date")) \ No newline at end of file From 3a6ca13b4479e313f5c473444eb34308c9236e01 Mon Sep 17 00:00:00 2001 From: jsukrut Date: Sat, 15 Feb 2020 16:18:17 +0530 Subject: [PATCH 3/7] fix:Mandatory field property failed to work based on the selection of field 'Group Based on' on 'Student Group' Page #20605 --- .../education/doctype/student_group/student_group.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js index 4165ce0f2e..d7822487ec 100644 --- a/erpnext/education/doctype/student_group/student_group.js +++ b/erpnext/education/doctype/student_group/student_group.js @@ -70,6 +70,16 @@ frappe.ui.form.on("Student Group", { group_based_on: function(frm) { if (frm.doc.group_based_on == "Batch") { frm.doc.course = null; + frm.set_df_property('program', 'reqd', 1); + frm.set_df_property('course', 'reqd', 0); + } + else if (frm.doc.group_based_on == "Course") { + frm.set_df_property('program', 'reqd', 0); + frm.set_df_property('course', 'reqd', 1); + } + else if (frm.doc.group_based_on == "Activity") { + frm.set_df_property('program', 'reqd', 0); + frm.set_df_property('course', 'reqd', 0); } }, From c0fd30a7ec63cba49efd5fb282f991a78c8b82ec Mon Sep 17 00:00:00 2001 From: jsukrut Date: Sat, 15 Feb 2020 17:33:52 +0530 Subject: [PATCH 4/7] fix: Indentation --- erpnext/education/doctype/student_group/student_group.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js index d7822487ec..13724409ba 100644 --- a/erpnext/education/doctype/student_group/student_group.js +++ b/erpnext/education/doctype/student_group/student_group.js @@ -74,8 +74,8 @@ frappe.ui.form.on("Student Group", { frm.set_df_property('course', 'reqd', 0); } else if (frm.doc.group_based_on == "Course") { - frm.set_df_property('program', 'reqd', 0); - frm.set_df_property('course', 'reqd', 1); + frm.set_df_property('program', 'reqd', 0); + frm.set_df_property('course', 'reqd', 1); } else if (frm.doc.group_based_on == "Activity") { frm.set_df_property('program', 'reqd', 0); From e329d417d66d6b1698d71ff9e3b58a435e6d24ba Mon Sep 17 00:00:00 2001 From: shrikant dixit Date: Sat, 15 Feb 2020 18:20:05 +0530 Subject: [PATCH 5/7] fix: Added validation for student DOB can not be greater than Joining Date --- erpnext/education/doctype/student/student.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py index 99c4c0e908..ae8f3a2e54 100644 --- a/erpnext/education/doctype/student/student.py +++ b/erpnext/education/doctype/student/student.py @@ -25,6 +25,9 @@ class Student(Document): if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()): frappe.throw(_("Date of Birth cannot be greater than today.")) + if self.date_of_birth and getdate(self.date_of_birth) >= getdate(self.joining_date): + frappe.throw(_("Date of Birth cannot be greater than Joining Date.")) + if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving): frappe.throw(_("Joining Date can not be greater than Leaving Date")) From b3712158aef85ae298e3af5e0c54f50f02190ca5 Mon Sep 17 00:00:00 2001 From: P-Froggy <60393001+P-Froggy@users.noreply.github.com> Date: Sun, 16 Feb 2020 19:10:53 +0100 Subject: [PATCH 6/7] Bank accounts reference in supplier dashboard Adds a reference to linked bank accounts in supplier dashboard, which was previously missing. --- erpnext/buying/doctype/supplier/supplier_dashboard.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py index 887a093736..b3b294d570 100644 --- a/erpnext/buying/doctype/supplier/supplier_dashboard.py +++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py @@ -9,7 +9,8 @@ def get_data(): 'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'), 'fieldname': 'supplier', 'non_standard_fieldnames': { - 'Payment Entry': 'party_name' + 'Payment Entry': 'party_name', + 'Bank Account': 'party' }, 'transactions': [ { @@ -24,6 +25,10 @@ def get_data(): 'label': _('Payments'), 'items': ['Payment Entry'] }, + { + 'label': _('Bank'), + 'items': ['Bank Account'] + }, { 'label': _('Pricing'), 'items': ['Pricing Rule'] From 7a46aae57a613e65cba3d7ba8a6dc5ce65cfd9f0 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 17 Feb 2020 12:20:25 +0530 Subject: [PATCH 7/7] fix: updated package.json * fixed devDependencies typo which possibly caused https://discuss.erpnext.com/t/bin-sh-1-snyk-not-found-when-bench-update/58035 which was introduced in https://github.com/frappe/erpnext/pull/20563 * Added missing fields for package meta data --- package.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 13fcc0f98d..1b2dc9efcf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,21 @@ { - "devdependencies": { + "name": "erpnext", + "description": "Open Source ERP System powered by the Frappe Framework", + "repository": { + "type": "git", + "url": "git+https://github.com/frappe/erpnext.git" + }, + "homepage": "https://erpnext.com", + "author": "Frappe Technologies Pvt. Ltd.", + "license": "GPL-3.0", + "bugs": { + "url": "https://github.com/frappe/erpnext/issues" + }, + "devDependencies": { "snyk": "^1.290.1" }, + "dependencies": { + }, "scripts": { "snyk-protect": "snyk protect", "prepare": "yarn run snyk-protect"