瀏覽代碼

fix(unicode): Import unicode_literals in every file (#6805)

* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
version-14
Aditya Hase 6 年之前
committed by Rushabh Mehta
父節點
當前提交
837bfc0995
共有 100 個檔案被更改,包括 130 行新增22 行删除
  1. +1
    -0
      frappe/chat/__init__.py
  2. +2
    -0
      frappe/chat/doctype/chat_message/chat_message.py
  3. +2
    -0
      frappe/chat/doctype/chat_message/test_chat_message.py
  4. +2
    -0
      frappe/chat/doctype/chat_profile/chat_profile.py
  5. +4
    -2
      frappe/chat/doctype/chat_profile/test_chat_profile.py
  6. +2
    -0
      frappe/chat/doctype/chat_room/chat_room.py
  7. +2
    -0
      frappe/chat/doctype/chat_room_user/chat_room_user.py
  8. +2
    -0
      frappe/chat/util/__init__.py
  9. +6
    -3
      frappe/chat/util/test_util.py
  10. +8
    -6
      frappe/chat/util/util.py
  11. +1
    -0
      frappe/chat/website/__init__.py
  12. +1
    -0
      frappe/contacts/report/addresses_and_contacts/test_addresses_and_contacts.py
  13. +1
    -0
      frappe/core/doctype/docshare/test_docshare.py
  14. +1
    -0
      frappe/core/utils.py
  15. +1
    -0
      frappe/data_migration/doctype/data_migration_connector/connectors/base.py
  16. +1
    -0
      frappe/desk/doctype/note/test_note.py
  17. +1
    -0
      frappe/desk/page/backups/backups.py
  18. +1
    -0
      frappe/email/doctype/email_account/test_email_account.py
  19. +1
    -0
      frappe/email/inbox.py
  20. +1
    -0
      frappe/frappeclient.py
  21. +1
    -1
      frappe/geo/doctype/country/test_country.py
  22. +1
    -0
      frappe/geo/doctype/currency/test_currency.py
  23. +1
    -0
      frappe/integrations/data_migration_mapping/gcalendar_to_event/__init__.py
  24. +1
    -0
      frappe/integrations/doctype/social_login_keys/social_login_keys.py
  25. +2
    -1
      frappe/integrations/doctype/webhook/__init__.py
  26. +3
    -2
      frappe/model/dynamic_links.py
  27. +1
    -0
      frappe/model/utils/user_settings.py
  28. +1
    -0
      frappe/modules/__init__.py
  29. +1
    -0
      frappe/oauth.py
  30. +1
    -0
      frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py
  31. +1
    -0
      frappe/patches/v10_0/enhance_security.py
  32. +1
    -0
      frappe/patches/v10_0/increase_single_table_column_length.py
  33. +1
    -0
      frappe/patches/v10_0/migrate_passwords_passlib.py
  34. +1
    -0
      frappe/patches/v10_0/modify_naming_series_table.py
  35. +1
    -0
      frappe/patches/v10_0/modify_smallest_currency_fraction.py
  36. +1
    -0
      frappe/patches/v10_0/refactor_social_login_keys.py
  37. +1
    -0
      frappe/patches/v10_0/reload_countries_and_currencies.py
  38. +1
    -0
      frappe/patches/v10_0/remove_custom_field_for_disabled_domain.py
  39. +1
    -0
      frappe/patches/v10_0/set_default_locking_time.py
  40. +1
    -0
      frappe/patches/v10_0/set_no_copy_to_workflow_state.py
  41. +1
    -0
      frappe/patches/v11_0/change_email_signature_fieldtype.py
  42. +1
    -0
      frappe/patches/v11_0/copy_fetch_data_from_options.py
  43. +1
    -0
      frappe/patches/v11_0/delete_all_prepared_reports.py
  44. +1
    -0
      frappe/patches/v11_0/delete_duplicate_user_permissions.py
  45. +1
    -0
      frappe/patches/v11_0/drop_column_apply_user_permissions.py
  46. +1
    -0
      frappe/patches/v11_0/fix_order_by_in_reports_json.py
  47. +1
    -0
      frappe/patches/v11_0/get_docs_apps_if_not_present.py
  48. +1
    -0
      frappe/patches/v11_0/migrate_report_settings_for_new_listview.py
  49. +1
    -0
      frappe/patches/v11_0/multiple_references_in_events.py
  50. +1
    -0
      frappe/patches/v11_0/reload_and_rename_view_log.py
  51. +1
    -0
      frappe/patches/v11_0/remove_skip_for_doctype.py
  52. +1
    -0
      frappe/patches/v11_0/rename_email_alert_to_notification.py
  53. +7
    -6
      frappe/patches/v11_0/rename_google_maps_doctype.py
  54. +1
    -0
      frappe/patches/v11_0/rename_standard_reply_to_email_template.py
  55. +1
    -0
      frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py
  56. +1
    -0
      frappe/patches/v11_0/replicate_old_user_permissions.py
  57. +1
    -0
      frappe/patches/v11_0/set_allow_self_approval_in_workflow.py
  58. +1
    -0
      frappe/patches/v11_0/sync_stripe_settings_before_migrate.py
  59. +1
    -0
      frappe/patches/v11_0/sync_user_permission_doctype_before_migrate.py
  60. +1
    -0
      frappe/patches/v5_0/clear_website_group_and_notifications.py
  61. +1
    -0
      frappe/patches/v5_0/communication_parent.py
  62. +1
    -0
      frappe/patches/v5_0/expire_old_scheduler_logs.py
  63. +1
    -0
      frappe/patches/v5_0/modify_session.py
  64. +1
    -0
      frappe/patches/v5_0/move_scheduler_last_event_to_system_settings.py
  65. +1
    -0
      frappe/patches/v5_0/rename_table_fieldnames.py
  66. +1
    -0
      frappe/patches/v5_0/update_shared.py
  67. +1
    -0
      frappe/patches/v6_0/document_type_rename.py
  68. +1
    -0
      frappe/patches/v6_0/fix_ghana_currency.py
  69. +1
    -0
      frappe/patches/v6_0/make_task_log_folder.py
  70. +1
    -1
      frappe/patches/v6_1/rename_file_data.py
  71. +1
    -0
      frappe/patches/v6_11/rename_field_in_email_account.py
  72. +1
    -0
      frappe/patches/v6_15/set_username.py
  73. +1
    -0
      frappe/patches/v6_2/rename_backup_manager.py
  74. +1
    -0
      frappe/patches/v6_20x/remove_roles_from_website_user.py
  75. +1
    -0
      frappe/patches/v6_20x/set_allow_draft_for_print.py
  76. +1
    -0
      frappe/patches/v6_20x/update_insert_after.py
  77. +1
    -0
      frappe/patches/v6_24/set_language_as_code.py
  78. +1
    -0
      frappe/patches/v6_24/sync_desktop_icons.py
  79. +1
    -0
      frappe/patches/v7_0/add_communication_in_doc.py
  80. +1
    -0
      frappe/patches/v7_0/cleanup_list_settings.py
  81. +1
    -0
      frappe/patches/v7_0/create_private_file_folder.py
  82. +1
    -0
      frappe/patches/v7_0/desktop_icons_hidden_by_admin_as_blocked.py
  83. +1
    -0
      frappe/patches/v7_0/re_route.py
  84. +1
    -0
      frappe/patches/v7_0/rename_bulk_email_to_email_queue.py
  85. +1
    -0
      frappe/patches/v7_0/rename_newsletter_list_to_email_group.py
  86. +1
    -0
      frappe/patches/v7_0/set_user_fullname.py
  87. +1
    -0
      frappe/patches/v7_0/update_send_after_in_bulk_email.py
  88. +1
    -0
      frappe/patches/v7_1/rename_chinese_language_codes.py
  89. +1
    -0
      frappe/patches/v7_1/rename_scheduler_log_to_error_log.py
  90. +1
    -0
      frappe/patches/v7_1/sync_language_doctype.py
  91. +1
    -0
      frappe/patches/v7_2/fix_email_queue_recipient.py
  92. +1
    -0
      frappe/patches/v7_2/merge_knowledge_base.py
  93. +1
    -0
      frappe/patches/v7_2/remove_in_filter.py
  94. +1
    -0
      frappe/patches/v7_2/set_doctype_engine.py
  95. +1
    -0
      frappe/patches/v7_2/set_in_standard_filter_property.py
  96. +1
    -0
      frappe/patches/v7_2/setup_custom_perms.py
  97. +1
    -0
      frappe/patches/v7_2/setup_ldap_config.py
  98. +1
    -0
      frappe/patches/v7_2/update_communications.py
  99. +1
    -0
      frappe/patches/v7_2/update_feedback_request.py
  100. +1
    -0
      frappe/patches/v8_0/deprecate_integration_broker.py

+ 1
- 0
frappe/chat/__init__.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _



+ 2
- 0
frappe/chat/doctype/chat_message/chat_message.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - standard imports
import json



+ 2
- 0
frappe/chat/doctype/chat_message/test_chat_message.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - standard imports
import unittest



+ 2
- 0
frappe/chat/doctype/chat_profile/chat_profile.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - module imports
from frappe.model.document import Document
from frappe import _


+ 4
- 2
frappe/chat/doctype/chat_profile/test_chat_profile.py 查看文件

@@ -1,3 +1,5 @@
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'


+ 2
- 0
frappe/chat/doctype/chat_room/chat_room.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - standard imports
import json



+ 2
- 0
frappe/chat/doctype/chat_room_user/chat_room_user.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - module imports
from frappe.model.document import Document
import frappe


+ 2
- 0
frappe/chat/util/__init__.py 查看文件

@@ -1,3 +1,5 @@
from __future__ import unicode_literals

# imports - module imports
from frappe.chat.util.util import (
get_user_doc,


+ 6
- 3
frappe/chat/util/test_util.py 查看文件

@@ -1,3 +1,5 @@
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)



+ 8
- 6
frappe/chat/util/util.py 查看文件

@@ -1,3 +1,5 @@
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)

+ 1
- 0
frappe/chat/website/__init__.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.chat.util import filter_dict, safe_json_loads



+ 1
- 0
frappe/contacts/report/addresses_and_contacts/test_addresses_and_contacts.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import frappe.defaults
import unittest


+ 1
- 0
frappe/core/doctype/docshare/test_docshare.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

from __future__ import unicode_literals
import frappe
import frappe.share
import unittest


+ 1
- 0
frappe/core/utils.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe




+ 1
- 0
frappe/data_migration/doctype/data_migration_connector/connectors/base.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
from six import with_metaclass
from abc import ABCMeta, abstractmethod
from frappe.utils.password import get_decrypted_password


+ 1
- 0
frappe/desk/doctype/note/test_note.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt

from __future__ import unicode_literals
import frappe
import unittest



+ 1
- 0
frappe/desk/page/backups/backups.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import os
import frappe
from frappe import _


+ 1
- 0
frappe/email/doctype/email_account/test_email_account.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

from __future__ import unicode_literals
import frappe, os
import unittest, email



+ 1
- 0
frappe/email/inbox.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import json



+ 1
- 0
frappe/frappeclient.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import print_function, unicode_literals
from __future__ import print_function
import requests
import json


+ 1
- 1
frappe/geo/doctype/country/test_country.py 查看文件

@@ -1,6 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: See license.txt

from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Country')

+ 1
- 0
frappe/geo/doctype/currency/test_currency.py 查看文件

@@ -3,5 +3,6 @@

# pre loaded

from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Currency')

+ 1
- 0
frappe/integrations/data_migration_mapping/gcalendar_to_event/__init__.py 查看文件

@@ -1,5 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe
from datetime import datetime
from dateutil.parser import parse


+ 1
- 0
frappe/integrations/doctype/social_login_keys/social_login_keys.py 查看文件

@@ -1,4 +1,5 @@
# see license
from __future__ import unicode_literals
from frappe.model.document import Document

class SocialLoginKeys(Document):


+ 2
- 1
frappe/integrations/doctype/webhook/__init__.py 查看文件

@@ -2,6 +2,7 @@
# Copyright (c) 2017, Frappe Technologies and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
import frappe

def run_webhooks(doc, method):
@@ -37,7 +38,7 @@ def run_webhooks(doc, method):

def _webhook_request(webhook):
if not webhook.name in frappe.flags.webhooks_executed.get(doc.name, []):
frappe.enqueue("frappe.integrations.doctype.webhook.webhook.enqueue_webhook",
frappe.enqueue("frappe.integrations.doctype.webhook.webhook.enqueue_webhook",
enqueue_after_commit=True, doc=doc, webhook=webhook)

# keep list of webhooks executed for this doc in this request


+ 3
- 2
frappe/model/dynamic_links.py 查看文件

@@ -1,10 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe

# select doctypes that are accessed by the user (not read_only) first, so that the
# the validation message shows the user-facing doctype first.
# select doctypes that are accessed by the user (not read_only) first, so that the
# the validation message shows the user-facing doctype first.
# For example Journal Entry should be validated before GL Entry (which is an internal doctype)

dynamic_link_queries = [


+ 1
- 0
frappe/model/utils/user_settings.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
# Settings saved per user basis
# such as page_limit, filters, last_view



+ 1
- 0
frappe/modules/__init__.py 查看文件

@@ -1 +1,2 @@
from __future__ import unicode_literals
from .utils import *

+ 1
- 0
frappe/oauth.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import print_function, unicode_literals
from __future__ import print_function
import frappe
import pytz


+ 1
- 0
frappe/patches/v10_0/enable_chat_by_default_within_system_settings.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v10_0/enhance_security.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals

import frappe



+ 1
- 0
frappe/patches/v10_0/increase_single_table_column_length.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
"""
Run this after updating country_info.json and or
"""


+ 1
- 0
frappe/patches/v10_0/migrate_passwords_passlib.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils.password import LegacyPassword



+ 1
- 0
frappe/patches/v10_0/modify_naming_series_table.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals

'''
Modify the Integer 10 Digits Value to BigInt 20 Digit value


+ 1
- 0
frappe/patches/v10_0/modify_smallest_currency_fraction.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe

def execute():

+ 1
- 0
frappe/patches/v10_0/refactor_social_login_keys.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals

import frappe
from frappe.utils import cstr


+ 1
- 0
frappe/patches/v10_0/reload_countries_and_currencies.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
"""
Run this after updating country_info.json and or
"""


+ 1
- 0
frappe/patches/v10_0/remove_custom_field_for_disabled_domain.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v10_0/set_default_locking_time.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v10_0/set_no_copy_to_workflow_state.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/change_email_signature_fieldtype.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/copy_fetch_data_from_options.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/delete_all_prepared_reports.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/delete_duplicate_user_permissions.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/drop_column_apply_user_permissions.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/fix_order_by_in_reports_json.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, json

def execute():


+ 1
- 0
frappe/patches/v11_0/get_docs_apps_if_not_present.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils.help import setup_apps_for_docs



+ 1
- 0
frappe/patches/v11_0/migrate_report_settings_for_new_listview.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, json

def execute():


+ 1
- 0
frappe/patches/v11_0/multiple_references_in_events.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/reload_and_rename_view_log.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/remove_skip_for_doctype.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.desk.form.linked_with import get_linked_doctypes
from frappe.patches.v11_0.replicate_old_user_permissions import get_doctypes_to_skip


+ 1
- 0
frappe/patches/v11_0/rename_email_alert_to_notification.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import rename_doc



+ 7
- 6
frappe/patches/v11_0/rename_google_maps_doctype.py 查看文件

@@ -1,7 +1,8 @@
import frappe
from frappe.model.rename_doc import rename_doc
def execute():
if frappe.db.exists("DocType","Google Maps") and not frappe.db.exists("DocType","Google Maps Settings"):
rename_doc('DocType', 'Google Maps', 'Google Maps Settings')
from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import rename_doc

def execute():
if frappe.db.exists("DocType","Google Maps") and not frappe.db.exists("DocType","Google Maps Settings"):
rename_doc('DocType', 'Google Maps', 'Google Maps Settings')
frappe.reload_doc('integrations', 'doctype', 'google_maps_settings')

+ 1
- 0
frappe/patches/v11_0/rename_standard_reply_to_email_template.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import rename_doc



+ 1
- 0
frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import rename_doc



+ 1
- 0
frappe/patches/v11_0/replicate_old_user_permissions.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import json
from frappe.utils import cint


+ 1
- 0
frappe/patches/v11_0/set_allow_self_approval_in_workflow.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v11_0/sync_stripe_settings_before_migrate.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils.password import get_decrypted_password



+ 1
- 0
frappe/patches/v11_0/sync_user_permission_doctype_before_migrate.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/clear_website_group_and_notifications.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/communication_parent.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/expire_old_scheduler_logs.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/modify_session.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/move_scheduler_last_event_to_system_settings.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v5_0/rename_table_fieldnames.py 查看文件

@@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt

from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
from frappe.modules import scrub, get_doctype_module


+ 1
- 0
frappe/patches/v5_0/update_shared.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import frappe.share



+ 1
- 0
frappe/patches/v6_0/document_type_rename.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_0/fix_ghana_currency.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals

def execute():
from frappe.geo.country_info import get_all


+ 1
- 0
frappe/patches/v6_0/make_task_log_folder.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe.utils, os

def execute():


+ 1
- 1
frappe/patches/v6_1/rename_file_data.py 查看文件

@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import print_function, unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_11/rename_field_in_email_account.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_15/set_username.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_2/rename_backup_manager.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_20x/remove_roles_from_website_user.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v6_20x/set_allow_draft_for_print.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():

+ 1
- 0
frappe/patches/v6_20x/update_insert_after.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, json

def execute():


+ 1
- 0
frappe/patches/v6_24/set_language_as_code.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

from frappe.translate import get_lang_dict


+ 1
- 0
frappe/patches/v6_24/sync_desktop_icons.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, json

from frappe.desk.doctype.desktop_icon.desktop_icon import sync_from_app, get_user_copy


+ 1
- 0
frappe/patches/v7_0/add_communication_in_doc.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

from frappe.core.doctype.communication.comment import update_comment_in_doc


+ 1
- 0
frappe/patches/v7_0/cleanup_list_settings.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, json

def execute():


+ 1
- 0
frappe/patches/v7_0/create_private_file_folder.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, os

def execute():


+ 1
- 0
frappe/patches/v7_0/desktop_icons_hidden_by_admin_as_blocked.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_0/re_route.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.base_document import get_controller



+ 1
- 0
frappe/patches/v7_0/rename_bulk_email_to_email_queue.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():

+ 1
- 0
frappe/patches/v7_0/rename_newsletter_list_to_email_group.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_0/set_user_fullname.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_0/update_send_after_in_bulk_email.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import now_datetime



+ 1
- 0
frappe/patches/v7_1/rename_chinese_language_codes.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_1/rename_scheduler_log_to_error_log.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_1/sync_language_doctype.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.translate import get_lang_dict



+ 1
- 0
frappe/patches/v7_2/fix_email_queue_recipient.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_2/merge_knowledge_base.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

from frappe.patches.v7_0.re_route import update_routes


+ 1
- 0
frappe/patches/v7_2/remove_in_filter.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_2/set_doctype_engine.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_2/set_in_standard_filter_property.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import pymysql



+ 1
- 0
frappe/patches/v7_2/setup_custom_perms.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.permissions import setup_custom_perms
from frappe.core.page.permission_manager.permission_manager import get_standard_permissions


+ 1
- 0
frappe/patches/v7_2/setup_ldap_config.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint



+ 1
- 0
frappe/patches/v7_2/update_communications.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v7_2/update_feedback_request.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

def execute():


+ 1
- 0
frappe/patches/v8_0/deprecate_integration_broker.py 查看文件

@@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.integrations.utils import create_payment_gateway



部分文件因文件數量過多而無法顯示

Loading…
取消
儲存