Merge branch 'develop'
This commit is contained in:
commit
4c55d73bff
10 changed files with 732 additions and 596 deletions
|
|
@ -13,7 +13,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template
|
||||
|
||||
__version__ = '8.0.23'
|
||||
__version__ = '8.0.24'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -131,8 +131,13 @@ class Report(Document):
|
|||
if params.get('sort_by_next'):
|
||||
order_by += ', ' + _format(params.get('sort_by_next').split('.')) + ' ' + params.get('sort_order_next')
|
||||
|
||||
result = frappe.get_list(self.ref_doctype, fields = [_format([c[1], c[0]]) for c in columns],
|
||||
filters=_filters, order_by = order_by, as_list=True, limit=limit, user=user)
|
||||
result = frappe.get_list(self.ref_doctype,
|
||||
fields = [_format([c[1], c[0]]) for c in columns],
|
||||
filters=_filters,
|
||||
order_by = order_by,
|
||||
as_list=True,
|
||||
limit=limit,
|
||||
user=user)
|
||||
|
||||
meta = frappe.get_meta(self.ref_doctype)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -40,6 +41,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -70,6 +72,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -99,6 +102,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -127,6 +131,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -155,6 +160,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -184,6 +190,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -212,6 +219,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -241,6 +249,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -269,6 +278,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -298,6 +308,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -327,6 +338,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -358,6 +370,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -387,6 +400,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -418,6 +432,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -447,6 +462,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -454,7 +470,7 @@
|
|||
"description": "Run scheduled jobs only if checked",
|
||||
"fieldname": "enable_scheduler",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
|
|
@ -476,6 +492,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -505,6 +522,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -533,6 +551,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -564,6 +583,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -595,6 +615,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -623,6 +644,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -653,6 +675,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -683,6 +706,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
|
|
@ -712,6 +736,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -742,6 +767,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -770,6 +796,7 @@
|
|||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
|
|
@ -810,7 +837,7 @@
|
|||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-13 02:23:18.660325",
|
||||
"modified": "2017-04-25 12:00:12.846542",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "System Settings",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
* `bench get-app [repo-link]` - Downloads an app from a git repository and installs it
|
||||
* `bench install-app [app-name]` Installs existing app
|
||||
* `bench remove-from-installed-apps [app-name]` Remove app from the list of apps
|
||||
* `bench uninstall-app [app-name]` Delete app and everything linked to the app
|
||||
* `bench uninstall-app [app-name]` Delete app and everything linked to the app (Bench needs to be running)
|
||||
* `bench remove-app [app-name]` Remove app from the bench entirely
|
||||
* `bench --site [sitename] --force reinstall ` Reinstall with fresh database (Caution: Will wipe out old database)
|
||||
* `bench new-site [sitename]` - Creates a new site
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -73,7 +73,8 @@ class DatabaseQuery(object):
|
|||
self.user = user or frappe.session.user
|
||||
self.update = update
|
||||
self.user_settings_fields = copy.deepcopy(self.fields)
|
||||
#self.debug = True
|
||||
# self.debug = True
|
||||
|
||||
if user_settings:
|
||||
self.user_settings = json.loads(user_settings)
|
||||
|
||||
|
|
@ -139,9 +140,9 @@ class DatabaseQuery(object):
|
|||
self.set_field_tables()
|
||||
|
||||
args.fields = ', '.join(self.fields)
|
||||
|
||||
|
||||
self.set_order_by(args)
|
||||
|
||||
|
||||
self.validate_order_by_and_group_by(args.order_by)
|
||||
args.order_by = args.order_by and (" order by " + args.order_by) or ""
|
||||
|
||||
|
|
@ -449,7 +450,7 @@ class DatabaseQuery(object):
|
|||
|
||||
def set_order_by(self, args):
|
||||
meta = frappe.get_meta(self.doctype)
|
||||
|
||||
|
||||
if self.order_by:
|
||||
args.order_by = self.order_by
|
||||
else:
|
||||
|
|
@ -490,7 +491,7 @@ class DatabaseQuery(object):
|
|||
_lower = parameters.lower()
|
||||
if 'select' in _lower and ' from ' in _lower:
|
||||
frappe.throw(_('Cannot use sub-query in order by'))
|
||||
|
||||
|
||||
|
||||
for field in parameters.split(","):
|
||||
if "." in field and field.strip().startswith("`tab"):
|
||||
|
|
|
|||
|
|
@ -179,4 +179,5 @@ execute:frappe.db.sql("delete from `tabDesktop Icon` where module_name='Communic
|
|||
execute:frappe.db.sql("update `tabDesktop Icon` set type='list' where _doctype='Communication'")
|
||||
frappe.patches.v8_0.fix_non_english_desktop_icons # 2017-04-12
|
||||
frappe.patches.v8_0.set_doctype_values_in_custom_role
|
||||
frappe.patches.v8_0.install_new_build_system_requirements
|
||||
frappe.patches.v8_0.install_new_build_system_requirements
|
||||
frappe.patches.v8_0.set_currency_field_precision
|
||||
|
|
@ -1,9 +1,18 @@
|
|||
import subprocess
|
||||
from subprocess import Popen, call, PIPE
|
||||
|
||||
def execute():
|
||||
subprocess.call([
|
||||
# update nodejs version if brew exists
|
||||
p = Popen(['which', 'brew'], stdout=PIPE, stderr=PIPE)
|
||||
output, err = p.communicate()
|
||||
if output:
|
||||
call(['brew', 'upgrade', 'node'])
|
||||
else:
|
||||
print 'Please update your NodeJS version'
|
||||
|
||||
call([
|
||||
'npm', 'install',
|
||||
'babel-core',
|
||||
'less',
|
||||
'chokidar',
|
||||
'babel-preset-es2015',
|
||||
'babel-preset-es2016',
|
||||
|
|
|
|||
21
frappe/patches/v8_0/set_currency_field_precision.py
Normal file
21
frappe/patches/v8_0/set_currency_field_precision.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils import get_number_format_info
|
||||
|
||||
def execute():
|
||||
if not frappe.db.get_value("System Settings", None, "currency_precision"):
|
||||
default_currency = frappe.db.get_default("currency")
|
||||
number_format = frappe.db.get_value("Currency", default_currency, "number_format") \
|
||||
or frappe.db.get_default("number_format")
|
||||
if number_format:
|
||||
precision = get_number_format_info(number_format)[2]
|
||||
else:
|
||||
precision = 2
|
||||
|
||||
ss = frappe.get_doc("System Settings")
|
||||
ss.currency_precision = precision
|
||||
ss.save()
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ frappe.views.ReportView = frappe.ui.BaseList.extend({
|
|||
}
|
||||
if(!docfield) return;
|
||||
|
||||
coldef = {
|
||||
let coldef = {
|
||||
id: c[0],
|
||||
field: c[0],
|
||||
docfield: docfield,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue