Merge branch 'develop' of https://github.com/frappe/erpnext into develop
diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py
index 887a093..b3b294d 100644
--- a/erpnext/buying/doctype/supplier/supplier_dashboard.py
+++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py
@@ -9,7 +9,8 @@
'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': [
{
@@ -25,6 +26,10 @@
'items': ['Payment Entry']
},
{
+ 'label': _('Bank'),
+ 'items': ['Bank Account']
+ },
+ {
'label': _('Pricing'),
'items': ['Pricing Rule']
}
diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py
index 1a870a3..45e848b 100644
--- a/erpnext/education/doctype/student/student.py
+++ b/erpnext/education/doctype/student/student.py
@@ -29,6 +29,9 @@
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"))
diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js
index 4165ce0..1372440 100644
--- a/erpnext/education/doctype/student_group/student_group.js
+++ b/erpnext/education/doctype/student_group/student_group.js
@@ -70,6 +70,16 @@
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);
}
},
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 b3e71a2..410f0cc 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 @@
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 @@
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
diff --git a/erpnext/projects/doctype/project_user/project_user.json b/erpnext/projects/doctype/project_user/project_user.json
index f0a70dd..2f452cc 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",
diff --git a/package.json b/package.json
index 13fcc0f..1b2dc9e 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"