mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
removed import error bypass and added missing py files for each doctype
This commit is contained in:
22
website/doctype/related_page/related_page.py
Normal file
22
website/doctype/related_page/related_page.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# ERPNext - web based ERP (http://erpnext.com)
|
||||
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
22
website/doctype/top_bar_item/top_bar_item.py
Normal file
22
website/doctype/top_bar_item/top_bar_item.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# ERPNext - web based ERP (http://erpnext.com)
|
||||
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
22
website/doctype/web_cache/web_cache.py
Normal file
22
website/doctype/web_cache/web_cache.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# ERPNext - web based ERP (http://erpnext.com)
|
||||
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
@@ -26,7 +26,6 @@ class DocType:
|
||||
* clear cache
|
||||
"""
|
||||
self.set_home_page()
|
||||
self.validate_domain_list()
|
||||
|
||||
def on_update(self):
|
||||
# make js and css
|
||||
@@ -54,21 +53,4 @@ class DocType:
|
||||
d.parentfield = 'default_home_pages'
|
||||
d.role = 'Guest'
|
||||
d.home_page = self.doc.home_page
|
||||
d.save()
|
||||
|
||||
|
||||
def validate_domain_list(self):
|
||||
"""
|
||||
Validate domain list if SaaS
|
||||
"""
|
||||
import webnotes
|
||||
|
||||
try:
|
||||
from server_tools.gateway_utils import validate_domain_list
|
||||
res = validate_domain_list(self.doc.domain_list, webnotes.conn.cur_db_name)
|
||||
if not res:
|
||||
webnotes.msgprint("""\
|
||||
There was some error in validating the domain list.
|
||||
Please contact us at support@erpnext.com""", raise_exception=1)
|
||||
except ImportError, e:
|
||||
pass
|
||||
d.save()
|
||||
Reference in New Issue
Block a user