Merge branch 'develop'

This commit is contained in:
Anand Doshi 2015-11-09 12:40:01 +05:30
commit cd45b98a77
9 changed files with 21 additions and 20 deletions

View file

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = "6.7.8"
__version__ = "6.7.9"

View file

@ -136,8 +136,8 @@ class DocType(Document):
def before_rename(self, old, new, merge=False):
"""Throw exception if merge. DocTypes cannot be merged."""
if frappe.session.user != "Administrator":
self.throw(_("DocType can only be renamed by Administrator"))
if not self.custom and frappe.session.user != "Administrator":
frappe.throw(_("DocType can only be renamed by Administrator"))
self.check_developer_mode()

View file

@ -902,9 +902,9 @@
"oldfieldname": "user_type",
"oldfieldtype": "Select",
"options": "System User\nWebsite User",
"permlevel": 0,
"permlevel": 1,
"print_hide": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@ -924,9 +924,9 @@
"in_list_view": 0,
"label": "Login After",
"no_copy": 0,
"permlevel": 0,
"permlevel": 1,
"print_hide": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -946,9 +946,9 @@
"in_list_view": 0,
"label": "Login Before",
"no_copy": 0,
"permlevel": 0,
"permlevel": 1,
"print_hide": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -968,9 +968,9 @@
"in_list_view": 0,
"label": "Restrict IP",
"no_copy": 0,
"permlevel": 0,
"permlevel": 1,
"print_hide": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -1250,7 +1250,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 5,
"modified": "2015-11-03 09:57:27.930248",
"modified": "2015-11-09 00:35:18.570974",
"modified_by": "Administrator",
"module": "Core",
"name": "User",

View file

@ -344,7 +344,7 @@ class Database:
_rhs = " ({0})".format(", ".join(inner_list))
del values[key]
if _operator not in ["=", "!=", ">", ">=", "<", "<=", "like", "in", "not in"]:
if _operator not in ["=", "!=", ">", ">=", "<", "<=", "like", "in", "not in", "not like"]:
_operator = "="
if "[" in key:

View file

@ -27,7 +27,7 @@ to ERPNext.
"""
app_icon = "octicon octicon-circuit-board"
app_version = "6.7.8"
app_version = "6.7.9"
app_color = "orange"
source_link = "https://github.com/frappe/frappe"
app_license = "MIT"

View file

@ -248,7 +248,7 @@ class DatabaseQuery(object):
value = get_time(f.value).strftime("%H:%M:%S.%f")
fallback = "'00:00:00'"
elif f.operator == "like" or (isinstance(f.value, basestring) and
elif f.operator in ("like", "not like") or (isinstance(f.value, basestring) and
(not df or df.fieldtype not in ["Float", "Int", "Currency", "Percent", "Check"])):
value = "" if f.value==None else f.value
fallback = '""'

View file

@ -8,6 +8,7 @@
<option value="in">{%= __("In") %}</option>
<option value="not in">{%= __("Not In") %}</option>
<option value="!=">{%= __("Not Equals") %}</option>
<option value="not like">{%= __("Not Like") %}</option>
<option value=">">{%= __(">") %}</option>
<option value="<">{%= __("<") %}</option>
<option value=">=">{%= __(">=") %}</option>

View file

@ -150,7 +150,7 @@ frappe.ui.Filter = Class.extend({
// add help for "in" codition
me.$w.find('.condition').change(function() {
var condition = $(this).val();
if(in_list(["in", "like", "not in"], condition)) {
if(in_list(["in", "like", "not in", "not like"], condition)) {
me.set_field(me.field.df.parent, me.field.df.fieldname, 'Data', condition);
if(!me.field.desc_area) {
me.field.desc_area = $('<div class="text-muted small">').appendTo(me.field.wrapper);
@ -210,12 +210,12 @@ frappe.ui.Filter = Class.extend({
}
var df = copy_dict(me.fieldselect.fields_by_name[doctype][fieldname]);
// all fields shown in filters
if(df.hidden) {
df.hidden = 0;
}
this.set_fieldtype(df, fieldtype);
// called when condition is changed,
@ -317,7 +317,7 @@ frappe.ui.Filter = Class.extend({
val = (val=='Yes' ? 1 :0);
}
if(this.get_condition()==='like') {
if(this.get_condition().indexOf('like', 'not like')!==-1) {
// automatically append wildcards
if(val) {
if(val.slice(0,1) !== "%") {

View file

@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "6.7.8"
version = "6.7.9"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()