Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

11 лет назад
Python 3 compatible print statements (#3199) * changes print statements in file to python 3 compatible style using `__future__` * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * changes deprecated md5 module to hashlib * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements
8 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
[feature] Global Search (again) (#2710) * [start] global search frappe/erpnext#6674 * [fix] setup before running test * [start] global search frappe/erpnext#6674 * Display result as rudimentary list, rebuild old doctypes * Media view, child tables, delete document updates, searchable fields * More results UI * Code clean up * remove msgprint from document.py to resolve merge conflict * Modularization stage 1, get show more to work with it * Dedicated modal Search bar works, some clean up needed * Can't data-dismiss on links, Bootstrap issue, use hashchange * Accomodate missing field content syndrome * Search in boolean mode, make GS default in awesome bar, fix double modal bug and cleanup * Add in Meta * Add in customize form * Modularise Global Search * Search object * Commonify Search UI: Stage I * II: save list state, UI, default condensed view, refactor * Fix SQL bug, Refactor awesome bar, Fix unicode bug, add nav results * Refactor using separate search objects, some async issues * Fix async flow * Fix preceding more list bug * UI additions * another async fix, back link * Help: Stage I * Help: Stage II * Background jobs, fix route options bug * Fix GS syncing on install * Add GS options in awesome bar: test * Input now remembers search type state * More UI updates * Add description for GS results in awesome bar * Fix help modal bug * Fix: not commit during install * Test cases, some fixes * Update in_test flag in enqueue * Disable GS sync when not install_db * Add flag check * Disable field in child tables * Cleanups * Create table fix * Fix redis exception, remove commit enqueue, add gs in migrate * Fix tests * Single enqueue * cleanups * Fix tests * Fix event test * Fix duplication, search as first option * Add show name in global search * fix event tests and desk.less * Fix communication.json * [fixes] wip * [fix] tests * [minor] for tests * [minor] for tests * [minor] for tests * [minor] for tests
8 лет назад
11 лет назад
9 лет назад
8 лет назад
9 лет назад
9 лет назад
8 лет назад
9 лет назад
11 лет назад
Email inbox (#2485) * Communication_reconciliation * Email inbox * added collapsed timeline for communication * new email prefill from when only one address * timeline duplication and notifcation and stability fixs * add subject to timeline * email system v7 fixes * added password required validation * use proper email datetime * email inbox v7.1 fixes * email inbox communication_date used instead of created * email inbox communication data cleanup * remove old patch * email inbox permit unlinking * [fix] duplication queue and rename domain to email domain * fix rename domain * email inbox index optimisation * email inbox relink doctype query usability fix * email_inbox Set attachment variable for forwards and replies based on whether it exists or not * uidnext fixes and cleanup * email inbox fix tests * fix rebase timeline issue * email inbox threading and cleanup * email inbox cleanup * bring inbox into frappe and cleanup * fix missed path * inbox cleanup * email-inbox move service back to account * separate to erpnext contact match * email inbox cleanup and move relink and timeline fix * relink optimisation * inbox fix footer * keep email drafts on pages not just forms * email inbox add sent items * email inbox allow not save list settings on query * email inbox cleanup and remove communications recon * add suspend sending button in email queue * fix rebase error * email inbox assorted fixes * email inbox fixes and relink option only when linked otherwise link; * email inbox fix sender fullname as administrator * create user email to custom button * email inbox sent no match and seen * email inbox fix unicode issues with subject recipient and sender
8 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
Python 3 compatible print statements (#3199) * changes print statements in file to python 3 compatible style using `__future__` * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * changes deprecated md5 module to hashlib * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements * adds python 3 style for print statements
8 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
10 лет назад
11 лет назад
10 лет назад
11 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
  2. # MIT License. See license.txt
  3. from __future__ import unicode_literals, print_function
  4. import frappe
  5. import getpass
  6. from frappe.utils.password import update_password
  7. def before_install():
  8. frappe.reload_doc("core", "doctype", "docfield")
  9. frappe.reload_doc("core", "doctype", "docperm")
  10. frappe.reload_doc("core", "doctype", "doctype")
  11. def after_install():
  12. # reset installed apps for re-install
  13. frappe.db.set_global("installed_apps", '["frappe"]')
  14. install_basic_docs()
  15. from frappe.core.doctype.file.file import make_home_folder
  16. make_home_folder()
  17. import_country_and_currency()
  18. from frappe.core.doctype.language.language import sync_languages
  19. sync_languages()
  20. # save default print setting
  21. print_settings = frappe.get_doc("Print Settings")
  22. print_settings.save()
  23. # all roles to admin
  24. frappe.get_doc("User", "Administrator").add_roles(*frappe.db.sql_list("""select name from tabRole"""))
  25. # update admin password
  26. update_password("Administrator", get_admin_password())
  27. # setup wizard now in frappe
  28. frappe.db.set_default('desktop:home_page', 'setup-wizard')
  29. frappe.db.commit()
  30. def install_basic_docs():
  31. # core users / roles
  32. install_docs = [
  33. {'doctype':'User', 'name':'Administrator', 'first_name':'Administrator',
  34. 'email':'admin@example.com', 'enabled':1, "is_admin": 1,
  35. 'roles': [{'role': 'Administrator'}]
  36. },
  37. {'doctype':'User', 'name':'Guest', 'first_name':'Guest',
  38. 'email':'guest@example.com', 'enabled':1, "is_guest": 1,
  39. 'roles': [{'role': 'Guest'}]
  40. },
  41. {'doctype': "Role", "role_name": "Report Manager"},
  42. {'doctype': "Workflow State", "workflow_state_name": "Pending",
  43. "icon": "question-sign", "style": ""},
  44. {'doctype': "Workflow State", "workflow_state_name": "Approved",
  45. "icon": "ok-sign", "style": "Success"},
  46. {'doctype': "Workflow State", "workflow_state_name": "Rejected",
  47. "icon": "remove", "style": "Danger"},
  48. {'doctype': "Workflow Action", "workflow_action_name": "Approve"},
  49. {'doctype': "Workflow Action", "workflow_action_name": "Reject"},
  50. {'doctype': "Workflow Action", "workflow_action_name": "Review"},
  51. {'doctype': "Email Domain", "domain_name":"example.com", "email_id": "account@example.com", "password": "pass", "email_server": "imap.example.com","use_imap": 1, "smtp_server": "smtp.example.com"},
  52. {'doctype': "Email Account", "domain":"example.com", "email_id": "notifications@example.com", "default_outgoing": 1},
  53. {'doctype': "Email Account", "domain":"example.com", "email_id": "replies@example.com", "default_incoming": 1}
  54. ]
  55. for d in install_docs:
  56. try:
  57. frappe.get_doc(d).insert()
  58. except frappe.NameError:
  59. pass
  60. def get_admin_password():
  61. def ask_admin_password():
  62. admin_password = getpass.getpass("Set Administrator password: ")
  63. admin_password2 = getpass.getpass("Re-enter Administrator password: ")
  64. if not admin_password == admin_password2:
  65. print("\nPasswords do not match")
  66. return ask_admin_password()
  67. return admin_password
  68. admin_password = frappe.conf.get("admin_password")
  69. if not admin_password:
  70. return ask_admin_password()
  71. return admin_password
  72. def before_tests():
  73. frappe.db.sql("delete from `tabCustom Field`")
  74. frappe.db.sql("delete from `tabEvent`")
  75. frappe.db.commit()
  76. frappe.clear_cache()
  77. def import_country_and_currency():
  78. from frappe.geo.country_info import get_all
  79. from frappe.utils import update_progress_bar
  80. data = get_all()
  81. for i, name in enumerate(data):
  82. update_progress_bar("Updating country info", i, len(data))
  83. country = frappe._dict(data[name])
  84. add_country_and_currency(name, country)
  85. print()
  86. # enable frequently used currencies
  87. for currency in ("INR", "USD", "GBP", "EUR", "AED", "AUD", "JPY", "CNY", "CHF"):
  88. frappe.db.set_value("Currency", currency, "enabled", 1)
  89. def add_country_and_currency(name, country):
  90. if not frappe.db.exists("Country", name):
  91. frappe.get_doc({
  92. "doctype": "Country",
  93. "country_name": name,
  94. "code": country.code,
  95. "date_format": country.date_format or "dd-mm-yyyy",
  96. "time_zones": "\n".join(country.timezones or []),
  97. "docstatus": 0
  98. }).db_insert()
  99. if country.currency and not frappe.db.exists("Currency", country.currency):
  100. frappe.get_doc({
  101. "doctype": "Currency",
  102. "currency_name": country.currency,
  103. "fraction": country.currency_fraction,
  104. "symbol": country.currency_symbol,
  105. "fraction_units": country.currency_fraction_units,
  106. "smallest_currency_fraction_value": country.smallest_currency_fraction_value,
  107. "number_format": country.number_format,
  108. "docstatus": 0
  109. }).db_insert()