Commit 3e28e047 authored by Sagar Vora's avatar Sagar Vora
Browse files

Merge branch 'staging-fixes' into staging

No related merge requests found
Showing with 75 additions and 56 deletions
+75 -56
......@@ -35,8 +35,6 @@ before_script:
- cd ~/frappe-bench
- bench use test_site
- bench reinstall --yes
- bench setup-help
- bench setup-global-help --mariadb_root_password travis
- bench scheduler disable
- sed -i 's/9000/9001/g' sites/common_site_config.json
- bench start &
......
......@@ -17,7 +17,13 @@ from faker import Faker
from .exceptions import *
from .utils.jinja import (get_jenv, get_template, render_template, get_email_from_template, get_jloader)
__version__ = '10.1.70'
# Hamless for Python 3
# For Python 2 set default encoding to utf-8
if sys.version[0] == '2':
reload(sys)
sys.setdefaultencoding("utf-8")
__version__ = '10.1.71'
__title__ = "Frappe Framework"
local = Local()
......
- Dynamic [Frappe Charts](https://github.com/frappe/charts) with Report Builder (built by @pratu16x7)
- New Frappe Chat for easier internal communication (built by @achillesrasquinha)
- [Frappe DataTable](https://github.com/frappe/datatable) for better reports (built by @netchampfaris)
- Google Calendar can now be integrated with Frappe
- Files can now be uploaded using drag-and-drop
- Enhanced List View and Tree View
- Bulk Actions from List View
- Quill editor has been introduced in place of Summernote
- HTML Editor has been introduced
- New User Permissions
- Subscriptions in ERPNext now moved to Auto Repeat in Frappe
- Support for Razorpay and PayPal subscriptions
- Better Social login, Workflow
- Messages for when user goes online/offline
- Logout from all sessions on password change
- Desktop icons can now be selected from a dialog box
- Changes have been made to ensure Frappe is compatible with Python 3
- Better documentation is now available with support for more languages
- A lot of other fixes have been done to ensure a better overall user experience
\ No newline at end of file
### User Permissions
- User Permission is now a DocType, a new UX for the existing Role and User Permission managers to make it easy to enter permissions. For more details please check <a href="https://erpnext.org/docs/user/manual/en/setting-up/users-and-permissions/user-permissions">User Permissions</a>
\ No newline at end of file
- User Permission is now a DocType, a new UX for the existing Role and User Permission managers to make it easy to enter permissions. For more details please check <a href="https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions/user-permissions">User Permissions</a>
\ No newline at end of file
from __future__ import unicode_literals
import frappe
from frappe import _
......
from __future__ import unicode_literals
# imports - standard imports
import json
......
from __future__ import unicode_literals
# imports - standard imports
import unittest
......
from __future__ import unicode_literals
# imports - module imports
from frappe.model.document import Document
from frappe import _
......
from __future__ import unicode_literals
# imports - standard imports
import unittest
......@@ -16,7 +18,7 @@ class TestChatProfile(unittest.TestCase):
# def test_create(self):
# with self.assertRaises(frappe.ValidationError):
# chat_profile.create(test_user)
# user = get_user_doc(session.user)
# if not user.chat_profile:
# chat_profile.create(user.name)
......@@ -47,7 +49,7 @@ class TestChatProfile(unittest.TestCase):
# ))
# user = get_user_doc(session.user)
# prev = chat_profile.get(user.name)
# prev = chat_profile.get(user.name)
# chat_profile.update(user.name, data = dict(
# status = 'Offline'
......
from __future__ import unicode_literals
# imports - standard imports
import json
......
from __future__ import unicode_literals
# imports - module imports
from frappe.model.document import Document
import frappe
......
from __future__ import unicode_literals
# imports - module imports
from frappe.chat.util.util import (
get_user_doc,
......
from __future__ import unicode_literals
# imports - standard imports
import unittest
......@@ -7,6 +9,7 @@ from frappe.chat.util import (
safe_json_loads
)
import frappe
import six
class TestChatUtil(unittest.TestCase):
def test_safe_json_loads(self):
......@@ -15,10 +18,10 @@ class TestChatUtil(unittest.TestCase):
number = safe_json_loads("1.0")
self.assertEqual(type(number), float)
string = safe_json_loads("foobar")
self.assertEqual(type(string), str)
self.assertEqual(type(string), six.text_type)
array = safe_json_loads('[{ "foo": "bar" }]')
self.assertEqual(type(array), list)
......
from __future__ import unicode_literals
# imports - third-party imports
import requests
......@@ -26,7 +28,7 @@ def get_user_doc(user = None):
user = user or session.user
user = frappe.get_doc('User', user)
return user
def squashify(what):
......@@ -43,9 +45,9 @@ def safe_json_loads(*args):
arg = json.loads(arg)
except Exception as e:
pass
results.append(arg)
return squashify(results)
def filter_dict(what, keys, ignore = False):
......@@ -68,7 +70,7 @@ def get_if_empty(a, b):
if not a:
a = b
return a
def listify(arg):
if not isinstance(arg, list):
arg = [arg]
......@@ -89,7 +91,7 @@ def check_url(what, raise_err = False):
raise ValueError('{what} not a valid URL.')
else:
return False
return True
def create_test_user(module):
......@@ -110,5 +112,5 @@ def get_emojis():
if resp.ok:
emojis = resp.json()
redis.hset('frappe_emojis', 'emojis', emojis)
return dictify(emojis)
\ No newline at end of file
from __future__ import unicode_literals
import frappe
from frappe.chat.util import filter_dict, safe_json_loads
......
from __future__ import unicode_literals, absolute_import, print_function
import click
import json, sys
import sys
import frappe
from frappe.utils import cint
from frappe.commands import pass_context, get_site
......
from __future__ import unicode_literals, absolute_import, print_function
import click
import frappe
from frappe.commands import pass_context, get_site
# translation
......
......@@ -571,54 +571,27 @@ def get_version():
@click.command('setup-global-help')
@click.option('--mariadb_root_password')
def setup_global_help(mariadb_root_password=None):
'''setup help table in a separate database that will be
'''Deprecated: setup help table in a separate database that will be
shared by the whole bench and set `global_help_setup` as 1 in
common_site_config.json'''
from frappe.installer import update_site_config
frappe.local.flags = frappe._dict()
frappe.local.flags.in_setup_help = True
frappe.local.flags.in_install = True
frappe.local.lang = 'en'
frappe.local.conf = frappe.get_site_config(sites_path='.')
update_site_config('global_help_setup', 1,
site_config_path=os.path.join('.', 'common_site_config.json'))
if mariadb_root_password:
frappe.local.conf.root_password = mariadb_root_password
from frappe.utils.help import sync
sync()
print_in_app_help_deprecation()
@click.command('get-docs-app')
@click.argument('app')
def get_docs_app(app):
'''Get the docs app for given app'''
from frappe.utils.help import setup_apps_for_docs
setup_apps_for_docs(app)
'''Deprecated: Get the docs app for given app'''
print_in_app_help_deprecation()
@click.command('get-all-docs-apps')
def get_all_docs_apps():
'''Get docs apps for all apps'''
from frappe.utils.help import setup_apps_for_docs
for app in frappe.get_installed_apps():
setup_apps_for_docs(app)
'''Deprecated: Get docs apps for all apps'''
print_in_app_help_deprecation()
@click.command('setup-help')
@pass_context
def setup_help(context):
'''Setup help table in the current site (called after migrate)'''
from frappe.utils.help import sync
for site in context.sites:
try:
frappe.init(site)
frappe.connect()
sync()
finally:
frappe.destroy()
'''Deprecated: Setup help table in the current site (called after migrate)'''
print_in_app_help_deprecation()
@click.command('rebuild-global-search')
@pass_context
......@@ -681,6 +654,10 @@ def auto_deploy(context, app, migrate=False, restart=False, remote='upstream'):
else:
print('No Updates')
def print_in_app_help_deprecation():
print("In app help has been removed.\nYou can access the documentation on erpnext.com/docs or frappe.io/docs")
return
commands = [
build,
clear_cache,
......@@ -709,8 +686,5 @@ commands = [
watch,
_bulk_rename,
add_to_email_queue,
setup_global_help,
setup_help,
rebuild_global_search,
auto_deploy
rebuild_global_search
]
from __future__ import unicode_literals
import frappe
import frappe.defaults
import unittest
......
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import frappe.share
import unittest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment