Merge branch 'develop' of https://github.com/frappe/erpnext into develop

This commit is contained in:
indictrans 2020-02-17 14:46:40 +05:30
commit a840889dd7
6 changed files with 46 additions and 5 deletions

View File

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

View File

@ -29,6 +29,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"))

View File

@ -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);
}
},

View File

@ -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))
.format(link, self.student))
def validate_dates(self):
if self.to_date < self.from_date :
throw(_("To Date cannot be less than From Date"))

View File

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

View File

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