Bladeren bron

Merge branch 'master' into develop

version-14
mbauskar 8 jaren geleden
bovenliggende
commit
bb6c3e4600
4 gewijzigde bestanden met toevoegingen van 25 en 17 verwijderingen
  1. +1
    -1
      frappe/__init__.py
  2. +3
    -2
      frappe/database.py
  3. +6
    -1
      frappe/desk/reportview.py
  4. +15
    -13
      frappe/model/dynamic_links.py

+ 1
- 1
frappe/__init__.py Bestand weergeven

@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template

__version__ = '8.6.6'
__version__ = '8.6.7'
__title__ = "Frappe Framework"

local = Local()


+ 3
- 2
frappe/database.py Bestand weergeven

@@ -600,8 +600,9 @@ class Database:

order_by = ("order by " + order_by) if order_by else ""

r = self.sql("select {0} from `tab{1}` where {2} {3}".format(fl, doctype,
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
r = self.sql("select {0} from `tab{1}` {2} {3} {4}"
.format(fl, doctype, "where" if conditions else "", conditions, order_by), values,
as_dict=as_dict, debug=debug, update=update)

return r



+ 6
- 1
frappe/desk/reportview.py Bestand weergeven

@@ -241,7 +241,12 @@ def get_stats(stats, doctype, filters=[]):
filters = json.loads(filters)
stats = {}

columns = frappe.db.get_table_columns(doctype)
try:
columns = frappe.db.get_table_columns(doctype)
except MySQLdb.OperationalError:
# raised when _user_tags column is added on the fly
columns = []

for tag in tags:
if not tag in columns: continue
try:


+ 15
- 13
frappe/model/dynamic_links.py Bestand weergeven

@@ -8,19 +8,21 @@ import frappe
# For example Journal Entry should be validated before GL Entry (which is an internal doctype)

dynamic_link_queries = [
"""select parent,
(select read_only from `tabDocType` where name=tabDocField.parent) as read_only,
fieldname, options
from tabDocField
where fieldtype='Dynamic Link'
order by read_only""",

"""select dt as parent,
(select read_only from `tabDocType` where name=`tabCustom Field`.dt) as read_only,
fieldname, options
from `tabCustom Field`
where fieldtype='Dynamic Link'
order by read_only""",
"""select tabDocField.parent,
`tabDocType`.read_only, `tabDocType`.in_create,
tabDocField.fieldname, tabDocField.options
from tabDocField, `tabDocType`
where `tabDocField`.fieldtype='Dynamic Link' and
`tabDocType`.name=`tabDocField`.parent
order by `tabDocType`.read_only, `tabDocType`.in_create""",

"""select `tabCustom Field`.dt as parent,
`tabDocType`.read_only, `tabDocType`.in_create,
`tabCustom Field`.fieldname, `tabCustom Field`.options
from `tabCustom Field`, `tabDocType`
where `tabCustom Field`.fieldtype='Dynamic Link' and
`tabDocType`.name=`tabCustom Field`.dt
order by `tabDocType`.read_only, `tabDocType`.in_create""",
]

def get_dynamic_link_map(for_delete=False):


Laden…
Annuleren
Opslaan