step 0: install
diff --git a/erpnext/hr/doctype/job_applicant/get_job_applications.py b/erpnext/hr/doctype/job_applicant/get_job_applications.py
index 33e1261..05bd46f 100644
--- a/erpnext/hr/doctype/job_applicant/get_job_applications.py
+++ b/erpnext/hr/doctype/job_applicant/get_job_applications.py
@@ -5,7 +5,7 @@
import webnotes
from webnotes.utils import cstr, cint
from webnotes.utils.email_lib.receive import POP3Mailbox
-from core.doctype.communication.communication import make
+from webnotes.core.doctype.communication.communication import make
class JobsMailbox(POP3Mailbox):
def setup(self, args=None):
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 38ca306..9b75b10 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -205,7 +205,7 @@
def notify(self, args):
args = webnotes._dict(args)
- from core.page.messages.messages import post
+ from webnotes.core.page.messages.messages import post
post({"txt": args.message, "contact": args.message_to, "subject": args.subject,
"notify": cint(self.doc.follow_via_email)})
diff --git a/erpnext/modules.txt b/erpnext/modules.txt
new file mode 100644
index 0000000..f7857e4
--- /dev/null
+++ b/erpnext/modules.txt
@@ -0,0 +1,11 @@
+accounts
+buying
+home
+hr
+manufacturing
+projects
+selling
+setup
+stock
+support
+utilities
\ No newline at end of file
diff --git a/erpnext/patches/1311/p01_cleanup.py b/erpnext/patches/1311/p01_cleanup.py
index 04d8f6a..23f6576 100644
--- a/erpnext/patches/1311/p01_cleanup.py
+++ b/erpnext/patches/1311/p01_cleanup.py
@@ -9,7 +9,7 @@
webnotes.reload_doc("buying", "doctype", "purchase_order")
webnotes.reload_doc("selling", "doctype", "lead")
- from core.doctype.custom_field.custom_field import create_custom_field_if_values_exist
+ from webnotes.core.doctype.custom_field.custom_field import create_custom_field_if_values_exist
create_custom_field_if_values_exist("Material Request",
{"fieldtype":"Text", "fieldname":"remark", "label":"Remarks","insert_after":"Fiscal Year"})
diff --git a/erpnext/patches/october_2013/p05_server_custom_script_to_file.py b/erpnext/patches/october_2013/p05_server_custom_script_to_file.py
index 76ec56c..5cffed6 100644
--- a/erpnext/patches/october_2013/p05_server_custom_script_to_file.py
+++ b/erpnext/patches/october_2013/p05_server_custom_script_to_file.py
@@ -17,7 +17,7 @@
"""
import os
from webnotes.utils import get_site_base_path
- from core.doctype.custom_script.custom_script import make_custom_server_script_file
+ from webnotes.core.doctype.custom_script.custom_script import make_custom_server_script_file
for name, dt, script in webnotes.conn.sql("""select name, dt, script from `tabCustom Script`
where script_type='Server'"""):
if script and script.strip():
diff --git a/erpnext/patches/october_2013/p10_plugins_refactor.py b/erpnext/patches/october_2013/p10_plugins_refactor.py
index 47d9d09..851c8af 100644
--- a/erpnext/patches/october_2013/p10_plugins_refactor.py
+++ b/erpnext/patches/october_2013/p10_plugins_refactor.py
@@ -6,6 +6,8 @@
def execute():
# changed cache key for plugin code files
+ return
+
for doctype in webnotes.conn.sql_list("""select name from `tabDocType`"""):
webnotes.cache().delete_value("_server_script:"+doctype)
diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py
index 89800f3..727edf3 100644
--- a/erpnext/portal/utils.py
+++ b/erpnext/portal/utils.py
@@ -59,7 +59,7 @@
@webnotes.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):
- from website.doctype.contact_us_settings.templates.pages.contact \
+ from webnotes.website.doctype.contact_us_settings.templates.pages.contact \
import send_message as website_send_message
if not website_send_message(subject, message, sender):
diff --git a/erpnext/selling/doctype/lead/get_leads.py b/erpnext/selling/doctype/lead/get_leads.py
index 7bc691f..898ee0e 100644
--- a/erpnext/selling/doctype/lead/get_leads.py
+++ b/erpnext/selling/doctype/lead/get_leads.py
@@ -5,7 +5,7 @@
import webnotes
from webnotes.utils import cstr, cint
from webnotes.utils.email_lib.receive import POP3Mailbox
-from core.doctype.communication.communication import make
+from webnotes.core.doctype.communication.communication import make
def add_sales_communication(subject, content, sender, real_name, mail=None,
status="Open", date=None):
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index 1078d03..15bb67a 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -280,7 +280,7 @@
return self.get_new_count("Project", self.meta.get_label("new_projects"), False)
def get_calendar_events(self, user_id):
- from core.doctype.event.event import get_events
+ from webnotes.core.doctype.event.event import get_events
events = get_events(self.future_from_date.strftime("%Y-%m-%d"), self.future_to_date.strftime("%Y-%m-%d"))
html = ""
@@ -301,7 +301,7 @@
return 0, "<p>Calendar Events</p>"
def get_todo_list(self, user_id):
- from core.page.todo.todo import get
+ from webnotes.core.page.todo.todo import get
todo_list = get()
html = ""
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index e2fc7ab..5ad25af 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -45,6 +45,6 @@
self.doc.title = self.doc.name
if self.doc.slideshow:
- from website.doctype.website_slideshow.website_slideshow import get_slideshow
+ from webnotes.website.doctype.website_slideshow.website_slideshow import get_slideshow
get_slideshow(self)
\ No newline at end of file
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index 234a689..f825e21 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -83,7 +83,7 @@
webnotes.clear_cache(doctype=doctype)
def check_duplicate(self):
- from core.doctype.doctype.doctype import DocType
+ from webnotes.core.doctype.doctype.doctype import DocType
dt = DocType()
parent = list(set(
@@ -136,7 +136,7 @@
msgprint("Please select prefix first")
def set_by_naming_series(doctype, fieldname, naming_series, hide_name_field=True):
- from core.doctype.property_setter.property_setter import make_property_setter
+ from webnotes.core.doctype.property_setter.property_setter import make_property_setter
if naming_series:
make_property_setter(doctype, "naming_series", "hidden", 0, "Check")
make_property_setter(doctype, "naming_series", "reqd", 1, "Check")
diff --git a/erpnext/startup/bean_handlers.py b/erpnext/startup/bean_handlers.py
index 06d2734..679c3aa 100644
--- a/erpnext/startup/bean_handlers.py
+++ b/erpnext/startup/bean_handlers.py
@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from home import update_feed
-from core.doctype.notification_count.notification_count import clear_doctype_notifications
+from webnotes.core.doctype.notification_count.notification_count import clear_doctype_notifications
from stock.doctype.material_request.material_request import update_completed_qty
def on_method(bean, method):
diff --git a/erpnext/startup/open_count.py b/erpnext/startup/open_count.py
index 38034e2..e561c03 100644
--- a/erpnext/startup/open_count.py
+++ b/erpnext/startup/open_count.py
@@ -41,7 +41,7 @@
def get_todays_events():
"""Returns a count of todays events in calendar"""
- from core.doctype.event.event import get_events
+ from webnotes.core.doctype.event.event import get_events
from webnotes.utils import nowdate
today = nowdate()
return len(get_events(today, today))
diff --git a/erpnext/startup/schedule_handlers.py b/erpnext/startup/schedule_handlers.py
index cdb0e5d..32987c4 100644
--- a/erpnext/startup/schedule_handlers.py
+++ b/erpnext/startup/schedule_handlers.py
@@ -27,11 +27,11 @@
def execute_daily():
# event reminders
- from core.doctype.event.event import send_event_digest
+ from webnotes.core.doctype.event.event import send_event_digest
run_fn(send_event_digest)
# clear daily event notifications
- from core.doctype.notification_count.notification_count import delete_notification_count_for
+ from webnotes.core.doctype.notification_count.notification_count import delete_notification_count_for
delete_notification_count_for("Event")
# email digest
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index a4985e9..0459070 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -238,7 +238,7 @@
self.doc.title = self.doc.item_name
if self.doc.slideshow:
- from website.doctype.website_slideshow.website_slideshow import get_slideshow
+ from webnotes.website.doctype.website_slideshow.website_slideshow import get_slideshow
get_slideshow(self)
def get_file_details(self, arg = ''):
diff --git a/erpnext/support/doctype/support_ticket/get_support_mails.py b/erpnext/support/doctype/support_ticket/get_support_mails.py
index 33cb023..b50e46e 100644
--- a/erpnext/support/doctype/support_ticket/get_support_mails.py
+++ b/erpnext/support/doctype/support_ticket/get_support_mails.py
@@ -6,7 +6,7 @@
from webnotes.utils import cstr, cint, decode_dict, today
from webnotes.utils.email_lib import sendmail
from webnotes.utils.email_lib.receive import POP3Mailbox
-from core.doctype.communication.communication import make
+from webnotes.core.doctype.communication.communication import make
class SupportMailbox(POP3Mailbox):
def setup(self, args=None):
diff --git a/erpnext/support/doctype/support_ticket/templates/pages/ticket.py b/erpnext/support/doctype/support_ticket/templates/pages/ticket.py
index 28d8802..f9e5c88 100644
--- a/erpnext/support/doctype/support_ticket/templates/pages/ticket.py
+++ b/erpnext/support/doctype/support_ticket/templates/pages/ticket.py
@@ -31,7 +31,7 @@
if bean.doc.raised_by != webnotes.session.user:
raise webnotes.throw(_("You are not allowed to reply to this ticket."), webnotes.PermissionError)
- from core.doctype.communication.communication import make
+ from webnotes.core.doctype.communication.communication import make
make(content=message, sender=bean.doc.raised_by, subject = bean.doc.subject,
doctype="Support Ticket", name=bean.doc.name,
date=today())
\ No newline at end of file
diff --git a/erpnext/utilities/demo/make_demo.py b/erpnext/utilities/demo/make_demo.py
index b98fd7a..18211a1 100644
--- a/erpnext/utilities/demo/make_demo.py
+++ b/erpnext/utilities/demo/make_demo.py
@@ -9,7 +9,7 @@
import json
webnotes.session = webnotes._dict({"user":"Administrator"})
-from core.page.data_import_tool.data_import_tool import upload
+from webnotes.core.page.data_import_tool.data_import_tool import upload
# fix price list
# fix fiscal year