mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[fix] [minor] create default web page only for first company
This commit is contained in:
@@ -68,7 +68,8 @@ class DocType:
|
|||||||
}).insert()
|
}).insert()
|
||||||
|
|
||||||
def create_default_web_page(self):
|
def create_default_web_page(self):
|
||||||
if not webnotes.conn.get_value("Website Settings", None, "home_page"):
|
if not webnotes.conn.get_value("Website Settings", None, "home_page") and \
|
||||||
|
not webnotes.conn.sql("select name from tabCompany where name!=%s", self.doc.name):
|
||||||
import os
|
import os
|
||||||
with open(os.path.join(os.path.dirname(__file__), "sample_home_page.html"), "r") as webfile:
|
with open(os.path.join(os.path.dirname(__file__), "sample_home_page.html"), "r") as webfile:
|
||||||
webpage = webnotes.bean({
|
webpage = webnotes.bean({
|
||||||
|
|||||||
Reference in New Issue
Block a user