[fixes] default_website and stock reco

This commit is contained in:
Rushabh Mehta
2015-03-24 17:34:58 +05:30
parent b6061e5d3f
commit 308e6ea21e
4 changed files with 10 additions and 8 deletions

View File

@@ -22,9 +22,9 @@ class website_maker(object):
"doctype": "Web Page",
"title": self.company,
"published": 1,
"header": "<h1>{0}</h1>".format(self.tagline or "Headline")+\
"header": "<div class='hero text-center'><h1>{0}</h1>".format(self.tagline or "Headline")+\
'<p>'+_("This is an example website auto-generated from ERPNext")+"</p>"+\
'<p><a class="btn btn-primary" href="/login">Login</a></p>',
'<p><a class="btn btn-primary" href="/login">Login</a></p></div>',
"description": self.company + ":" + (self.tagline or ""),
"css": frappe.get_template("setup/page/setup_wizard/data/sample_home_page.css").render(),
"main_section": frappe.get_template("setup/page/setup_wizard/data/sample_home_page.html").render({

View File

@@ -408,8 +408,8 @@ def create_logo(args):
filename, filetype, content = attach_logo
fileurl = save_file(filename, content, "Website Settings", "Website Settings",
decode=True).file_url
frappe.db.set_value("Website Settings", "Website Settings", "banner_html",
"<img src='%s' style='max-width: 100%%;'>" % fileurl)
frappe.db.set_value("Website Settings", "Website Settings", "brand_html",
"<img src='{0}' style='max-width: 40px; max-height: 25px;'> {1}".format(fileurl, args.get("company_name").strip()))
def add_all_roles_to(name):
user = frappe.get_doc("User", name)