mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 14:18:24 +00:00
Website Listing
This commit is contained in:
@@ -12,9 +12,11 @@ from frappe.website.doctype.website_slideshow.website_slideshow import get_slide
|
||||
|
||||
class ItemGroup(NestedSet, WebsiteGenerator):
|
||||
nsm_parent_field = 'parent_item_group'
|
||||
condition_field = "show_in_website"
|
||||
template = "templates/generators/item_group.html"
|
||||
parent_website_route_field = "parent_item_group"
|
||||
website = frappe._dict(
|
||||
condition_field = "show_in_website",
|
||||
template = "templates/generators/item_group.html",
|
||||
parent_website_route_field = "parent_item_group"
|
||||
)
|
||||
|
||||
def autoname(self):
|
||||
self.name = self.item_group_name
|
||||
|
||||
@@ -8,9 +8,12 @@ from frappe.website.website_generator import WebsiteGenerator
|
||||
from erpnext.utilities.address_and_contact import load_address_and_contact
|
||||
|
||||
class SalesPartner(WebsiteGenerator):
|
||||
page_title_field = "partner_name"
|
||||
condition_field = "show_in_website"
|
||||
template = "templates/generators/sales_partner.html"
|
||||
website = frappe._dict(
|
||||
page_title_field = "partner_name",
|
||||
condition_field = "show_in_website",
|
||||
template = "templates/generators/sales_partner.html"
|
||||
)
|
||||
|
||||
def onload(self):
|
||||
"""Load address and contacts in `__onload`"""
|
||||
load_address_and_contact(self, "sales_partner")
|
||||
|
||||
@@ -6,7 +6,6 @@ import frappe
|
||||
|
||||
from frappe import _
|
||||
from frappe.utils import nowdate
|
||||
from frappe.templates.pages.style_settings import default_properties
|
||||
|
||||
class website_maker(object):
|
||||
def __init__(self, company, tagline, user):
|
||||
@@ -14,7 +13,6 @@ class website_maker(object):
|
||||
self.tagline = tagline
|
||||
self.user = user
|
||||
self.make_web_page()
|
||||
self.make_style_settings()
|
||||
self.make_website_settings()
|
||||
self.make_blog()
|
||||
|
||||
@@ -34,12 +32,6 @@ class website_maker(object):
|
||||
})
|
||||
}).insert()
|
||||
|
||||
def make_style_settings(self):
|
||||
style_settings = frappe.get_doc("Style Settings", "Style Settings")
|
||||
style_settings.update(default_properties)
|
||||
style_settings.apply_style = 1
|
||||
style_settings.save()
|
||||
|
||||
def make_website_settings(self):
|
||||
# update in home page in settings
|
||||
website_settings = frappe.get_doc("Website Settings", "Website Settings")
|
||||
|
||||
Reference in New Issue
Block a user