Selaa lähdekoodia

Merge branch 'develop'

version-14
Pratik Vyas 11 vuotta sitten
vanhempi
commit
3c1e69c798
3 muutettua tiedostoa jossa 11 lisäystä ja 13 poistoa
  1. +1
    -1
      config.json
  2. +1
    -1
      requirements.txt
  3. +9
    -11
      webnotes/widgets/reportview.py

+ 1
- 1
config.json Näytä tiedosto

@@ -1,6 +1,6 @@
{
"base_template": "lib/website/templates/base.html",
"framework_version": "3.4.3",
"framework_version": "3.4.4",
"modules": {
"Calendar": {
"color": "#2980b9",


+ 1
- 1
requirements.txt Näytä tiedosto

@@ -7,7 +7,7 @@ httplib2
jinja2
markdown2
markupsafe
mysql-python
mysql-python==1.2.4
pygeoip
python-dateutil
python-memcached


+ 9
- 11
webnotes/widgets/reportview.py Näytä tiedosto

@@ -184,20 +184,18 @@ def build_filter_conditions(filters, conditions):
f[3] = "(" + ', '.join(opts) + ")"
conditions.append('ifnull(' + tname + '.' + f[1] + ", '') " + f[2] + " " + f[3])
else:
if isinstance(f[3], basestring):
df = webnotes.local.reportview_doctypes[f[0]].get({"doctype": "DocField",
"fieldname": f[1]})
df = webnotes.local.reportview_doctypes[f[0]].get({"doctype": "DocField",
"fieldname": f[1]})
if df and df[0].fieldtype in ["Float", "Int", "Currency", "Percent"]:
val, default_null_val = flt(f[3]), "0"
else:
val, default_null_val = ("'" + f[3].replace("'", "\\'") + "'"), '""'
if f[2] == "like" or (isinstance(f[3], basestring) and
(not df or df[0].fieldtype not in ["Float", "Int", "Currency", "Percent"])):
value, default_val = ("'" + f[3].replace("'", "\\'") + "'"), '""'
else:
val, default_null_val = f[3], '0'
value, default_val = flt(f[3]), 0
conditions.append('ifnull({tname}.{fname}, {default_val}) {operator} {value}'.format(
tname=tname, fname=f[1], default_val=default_null_val, operator=f[2],
value=cstr(val)))
tname=tname, fname=f[1], default_val=default_val, operator=f[2],
value=value))
def build_match_conditions(doctype, fields=None, as_condition=True):
"""add match conditions if applicable"""


Ladataan…
Peruuta
Tallenna