Merge branch 'hotfix'
This commit is contained in:
commit
6e4ab60e4c
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.0.38'
|
__version__ = '7.0.39'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -226,6 +226,12 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
|
|
||||||
party: function(frm) {
|
party: function(frm) {
|
||||||
if(frm.doc.payment_type && frm.doc.party_type && frm.doc.party) {
|
if(frm.doc.payment_type && frm.doc.party_type && frm.doc.party) {
|
||||||
|
if(!frm.doc.posting_date) {
|
||||||
|
frappe.msgprint(__("Please select Posting Date before selecting Party"))
|
||||||
|
frm.set_value("party", "");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
frm.set_party_account_based_on_party = true;
|
frm.set_party_account_based_on_party = true;
|
||||||
|
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 1,
|
||||||
"label": "Payment Type",
|
"label": "Payment Type",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
@ -1426,7 +1426,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-09-02 11:34:14.817383",
|
"modified": "2016-09-05 11:06:18.183458",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Entry",
|
"name": "Payment Entry",
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
frappe.listview_settings['Payment Entry'] = {
|
|
||||||
add_fields: ["payment_type"],
|
|
||||||
get_indicator: function(doc) {
|
|
||||||
return [__(doc.payment_type), (doc.docstatus==0 ? 'red' : 'blue'), 'status=' + doc.payment_type]
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,7 +17,8 @@ def get_filters_cond(doctype, filters, conditions):
|
|||||||
if isinstance(f[1], basestring) and f[1][0] == '!':
|
if isinstance(f[1], basestring) and f[1][0] == '!':
|
||||||
flt.append([doctype, f[0], '!=', f[1][1:]])
|
flt.append([doctype, f[0], '!=', f[1][1:]])
|
||||||
else:
|
else:
|
||||||
flt.append([doctype, f[0], '=', f[1]])
|
value = frappe.db.escape(f[1]) if isinstance(f[1], basestring) else f[1]
|
||||||
|
flt.append([doctype, f[0], '=', value])
|
||||||
|
|
||||||
query = DatabaseQuery(doctype)
|
query = DatabaseQuery(doctype)
|
||||||
query.filters = flt
|
query.filters = flt
|
||||||
|
@ -58,7 +58,7 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
if no_email_sp:
|
if no_email_sp:
|
||||||
frappe.msgprint(
|
frappe.msgprint(
|
||||||
frappe._("Setting Events to {0}, since the Employee attached to the below Sales Persons does not have a User ID{1}").format(
|
frappe._("Setting Events to {0}, since the Employee attached to the below Sales Persons does not have a User ID{1}").format(
|
||||||
self.owner, "<br>"+no_email_sp.join("<br>")
|
self.owner, "<br>" + "<br>".join(no_email_sp)
|
||||||
))
|
))
|
||||||
|
|
||||||
scheduled_date = frappe.db.sql("""select scheduled_date from
|
scheduled_date = frappe.db.sql("""select scheduled_date from
|
||||||
@ -187,14 +187,17 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
if not sr_details:
|
if not sr_details:
|
||||||
frappe.throw(_("Serial No {0} not found").format(serial_no))
|
frappe.throw(_("Serial No {0} not found").format(serial_no))
|
||||||
|
|
||||||
if sr_details.warranty_expiry_date and sr_details.warranty_expiry_date>=amc_start_date:
|
if sr_details.warranty_expiry_date \
|
||||||
throw(_("Serial No {0} is under warranty upto {1}").format(serial_no, sr_details.warranty_expiry_date))
|
and getdate(sr_details.warranty_expiry_date) >= getdate(amc_start_date):
|
||||||
|
throw(_("Serial No {0} is under warranty upto {1}")
|
||||||
|
.format(serial_no, sr_details.warranty_expiry_date))
|
||||||
|
|
||||||
if sr_details.amc_expiry_date and sr_details.amc_expiry_date >= amc_start_date:
|
if sr_details.amc_expiry_date and getdate(sr_details.amc_expiry_date) >= getdate(amc_start_date):
|
||||||
throw(_("Serial No {0} is under maintenance contract upto {1}").format(serial_no, sr_details.amc_start_date))
|
throw(_("Serial No {0} is under maintenance contract upto {1}")
|
||||||
|
.format(serial_no, sr_details.amc_start_date))
|
||||||
|
|
||||||
if not sr_details.warehouse and sr_details.delivery_date and \
|
if not sr_details.warehouse and sr_details.delivery_date and \
|
||||||
sr_details.delivery_date >= amc_start_date:
|
getdate(sr_details.delivery_date) >= getdate(amc_start_date):
|
||||||
throw(_("Maintenance start date can not be before delivery date for Serial No {0}")
|
throw(_("Maintenance start date can not be before delivery date for Serial No {0}")
|
||||||
.format(serial_no))
|
.format(serial_no))
|
||||||
|
|
||||||
|
@ -12,8 +12,9 @@ def execute(filters=None):
|
|||||||
filters["from_time"] = "00:00:00"
|
filters["from_time"] = "00:00:00"
|
||||||
filters["to_time"] = "24:00:00"
|
filters["to_time"] = "24:00:00"
|
||||||
|
|
||||||
columns = [_("Timesheet") + ":Link/Timesheet:120", _("Employee") + "::150", _("From Datetime") + "::140",
|
columns = [_("Timesheet") + ":Link/Timesheet:120", _("Employee") + "::150", _("Employee Name") + "::150",
|
||||||
_("To Datetime") + "::140", _("Hours") + "::70", _("Activity Type") + "::120", _("Task") + ":Link/Task:150",
|
_("From Datetime") + "::140", _("To Datetime") + "::140", _("Hours") + "::70",
|
||||||
|
_("Activity Type") + "::120", _("Task") + ":Link/Task:150",
|
||||||
_("Project") + ":Link/Project:120", _("Status") + "::70"]
|
_("Project") + ":Link/Project:120", _("Status") + "::70"]
|
||||||
|
|
||||||
conditions = "ts.docstatus = 1"
|
conditions = "ts.docstatus = 1"
|
||||||
@ -27,7 +28,8 @@ def execute(filters=None):
|
|||||||
return columns, data
|
return columns, data
|
||||||
|
|
||||||
def get_data(conditions, filters):
|
def get_data(conditions, filters):
|
||||||
time_sheet = frappe.db.sql(""" select ts.name, ts.employee, tsd.from_time, tsd.to_time, tsd.hours,
|
time_sheet = frappe.db.sql(""" select ts.name, ts.employee, ts.employee_name,
|
||||||
|
tsd.from_time, tsd.to_time, tsd.hours,
|
||||||
tsd.activity_type, tsd.task, tsd.project, ts.status from `tabTimesheet Detail` tsd,
|
tsd.activity_type, tsd.task, tsd.project, ts.status from `tabTimesheet Detail` tsd,
|
||||||
`tabTimesheet` ts where ts.name = tsd.parent and %s order by ts.name"""%(conditions), filters, as_list=1)
|
`tabTimesheet` ts where ts.name = tsd.parent and %s order by ts.name"""%(conditions), filters, as_list=1)
|
||||||
|
|
||||||
|
@ -22,12 +22,21 @@ def get_notification_config():
|
|||||||
"docstatus": ("<", 2)
|
"docstatus": ("<", 2)
|
||||||
},
|
},
|
||||||
"Journal Entry": {"docstatus": 0},
|
"Journal Entry": {"docstatus": 0},
|
||||||
"Sales Invoice": { "outstanding_amount": (">", 0), "docstatus": ("<", 2) },
|
"Sales Invoice": {
|
||||||
"Purchase Invoice": {"docstatus": 0},
|
"outstanding_amount": (">", 0),
|
||||||
|
"docstatus": ("<", 2)
|
||||||
|
},
|
||||||
|
"Purchase Invoice": {
|
||||||
|
"outstanding_amount": (">", 0),
|
||||||
|
"docstatus": ("<", 2)
|
||||||
|
},
|
||||||
"Leave Application": {"status": "Open"},
|
"Leave Application": {"status": "Open"},
|
||||||
"Expense Claim": {"approval_status": "Draft"},
|
"Expense Claim": {"approval_status": "Draft"},
|
||||||
"Job Applicant": {"status": "Open"},
|
"Job Applicant": {"status": "Open"},
|
||||||
"Delivery Note": {"docstatus": 0},
|
"Delivery Note": {
|
||||||
|
"status": ("not in", ("Completed", "Closed")),
|
||||||
|
"docstatus": ("<", 2)
|
||||||
|
},
|
||||||
"Stock Entry": {"docstatus": 0},
|
"Stock Entry": {"docstatus": 0},
|
||||||
"Material Request": {
|
"Material Request": {
|
||||||
"docstatus": ("<", 2),
|
"docstatus": ("<", 2),
|
||||||
@ -40,7 +49,10 @@ def get_notification_config():
|
|||||||
"status": ("not in", ("Completed", "Closed")),
|
"status": ("not in", ("Completed", "Closed")),
|
||||||
"docstatus": ("<", 2)
|
"docstatus": ("<", 2)
|
||||||
},
|
},
|
||||||
"Purchase Receipt": {"docstatus": 0},
|
"Purchase Receipt": {
|
||||||
|
"status": ("not in", ("Completed", "Closed")),
|
||||||
|
"docstatus": ("<", 2)
|
||||||
|
},
|
||||||
"Production Order": { "status": ("in", ("Draft", "Not Started", "In Process")) },
|
"Production Order": { "status": ("in", ("Draft", "Not Started", "In Process")) },
|
||||||
"BOM": {"docstatus": 0},
|
"BOM": {"docstatus": 0},
|
||||||
"Timesheet": {"status": "Draft"}
|
"Timesheet": {"status": "Draft"}
|
||||||
|
Loading…
Reference in New Issue
Block a user