Merge branch 'staging-fixes' into staging

This commit is contained in:
Frappe Bot 2018-12-19 06:28:00 +00:00
commit 41b6ef94f5
11 changed files with 25 additions and 13 deletions

View file

@ -17,7 +17,7 @@ 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.67'
__version__ = '10.1.68'
__title__ = "Frappe Framework"
local = Local()

View file

@ -61,9 +61,8 @@ class TestReport(unittest.TestCase):
with open(os.path.join(os.path.dirname(__file__), 'user_activity_report_without_sort.json'), 'r') as f:
frappe.get_doc(json.loads(f.read())).insert()
report = frappe.get_doc('Report', 'User Activity Report Without Sort')
# this would raise an error without the fix added along with this test case
columns, data = report.get_data()
self.assertEqual(columns[0].get('label'), 'ID')
self.assertEqual(columns[1].get('label'), 'User Type')
self.assertTrue('Administrator' in [d[0] for d in data])

View file

@ -276,6 +276,13 @@ class TestUser(unittest.TestCase):
self.assertEqual(extract_mentions(user_name)[0], "test-user")
user_name = "Testing comment, @test.user@example.com please check."
self.assertEqual(extract_mentions(user_name)[0], "test.user@example.com")
user_name = "<div>@test_user@example.com and @test.again@example1.com</div><div>This is a test.</div>"
self.assertEqual(extract_mentions(user_name)[0], "test_user@example.com")
self.assertEqual(extract_mentions(user_name)[1], "test.again@example1.com")
user_name = "<div>@user@example.com</a> Test @test-comment@xyz.com</div><div>Test for comment mentions @test@abc.com</div>"
self.assertEqual(extract_mentions(user_name)[0], "user@example.com")
self.assertEqual(extract_mentions(user_name)[1], "test-comment@xyz.com")
self.assertEqual(extract_mentions(user_name)[2], "test@abc.com")
def delete_contact(user):
frappe.db.sql("delete from tabContact where email_id='%s'" % frappe.db.escape(user))

View file

@ -922,7 +922,7 @@ def notify_admin_access_to_system_manager(login_manager=None):
def extract_mentions(txt):
"""Find all instances of @name in the string.
The mentions will be separated by non-word characters or may appear at the start of the string"""
txt = txt.replace("<br>", "<br> ")
txt = txt.replace("<div>", "<div> ")
txt = re.sub(r'(<[a-zA-Z\/][^>]*>)', '', txt)
return re.findall(r'(?:[^\w\.\-\@]|^)@([\w\.\-\@]*)', txt)

View file

@ -8,7 +8,7 @@
"space": 0.157,
"expiry": "2016-07-25",
"users": 1
}
},
"developer_mode": 1,
"auto_cache_clear": true,

View file

@ -12,7 +12,7 @@ source_link = "https://github.com/frappe/frappe"
app_license = "MIT"
develop_version = '12.x.x-develop'
staging_version = '11.0.3-beta.38'
staging_version = '11.0.3-beta.39'
app_email = "info@frappe.io"

View file

@ -66,12 +66,12 @@ More Details:
from __future__ import unicode_literals
import frappe
import json
import pytz
from frappe import _
from datetime import datetime
from six.moves.urllib.parse import urlencode
from frappe.model.document import Document
from frappe.integrations.utils import create_request_log, make_post_request, create_payment_gateway
from frappe.utils import get_url, call_hook_method, cint, get_timestamp, cstr, now, date_diff, get_datetime
from frappe.utils import get_url, call_hook_method, cint, get_datetime
api_path = '/api/method/frappe.integrations.doctype.paypal_settings.paypal_settings'
@ -309,9 +309,11 @@ def create_recurring_profile(token, payerid):
"INITAMT": data.get("upfront_amount")
})
starts_at = get_datetime(subscription_details.get("start_date")) or frappe.utils.now_datetime()
status_changed_to = 'Completed' if data.get("starting_immediately") or updating else 'Verified'
starts_at = get_datetime(subscription_details.get("start_date")) or frappe.utils.now_datetime()
starts_at = starts_at.replace(tzinfo=pytz.timezone(frappe.utils.get_time_zone())).astimezone(pytz.utc)
#"PROFILESTARTDATE": datetime.utcfromtimestamp(get_timestamp(starts_at)).isoformat()
params.update({
"PROFILESTARTDATE": starts_at.isoformat()

View file

@ -12,7 +12,6 @@ execute:frappe.reload_doc('core', 'doctype', 'docperm') #2018-05-29
frappe.patches.v8_0.drop_is_custom_from_docperm
execute:frappe.reload_doc('core', 'doctype', 'module_def') #2017-09-22
execute:frappe.reload_doc('core', 'doctype', 'version') #2017-04-01
frappe.patches.v11_0.copy_fetch_data_from_options
frappe.patches.v7_1.rename_scheduler_log_to_error_log
frappe.patches.v6_1.rename_file_data
frappe.patches.v7_0.re_route #2016-06-27
@ -20,6 +19,7 @@ frappe.patches.v8_0.update_records_in_global_search #11-05-2017
frappe.patches.v8_0.update_published_in_global_search
frappe.patches.v11_0.replicate_old_user_permissions
frappe.patches.v11_0.drop_column_apply_user_permissions
frappe.patches.v11_0.copy_fetch_data_from_options
frappe.patches.v11_0.change_email_signature_fieldtype
execute:frappe.reload_doc('core', 'doctype', 'activity_log')
execute:frappe.reload_doc('core', 'doctype', 'deleted_document')

View file

@ -7,6 +7,9 @@ def execute():
for d in reports_data:
doc = frappe.get_doc('Report', d.get('name'))
if not doc.get('json'): continue
json_data = json.loads(doc.get('json'))
parts = []

View file

@ -1055,8 +1055,9 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
for (let cdt in values) {
fields = fields.concat(values[cdt].map(f => [f, cdt]));
}
this.fields = fields;
// always keep name (ID) column
this.fields = [["name", this.doctype], ...fields];
this.fields.map(f => this.add_currency_column(f[0], f[1]));

View file

@ -3,7 +3,7 @@
// http://codeguide.co - @mdo (Author of Bootstrap)
@import "flex.less";
@import {reference} "common.less";
@import (reference) "common.less";
// Typography
@font-weight-bold: 700;