Fixed default website creation

Default website generation was creating company page twice,
which led to duplicate website route validation
This commit is contained in:
Anand Doshi 2014-04-22 19:50:04 +05:30
parent 68d0b7c7ff
commit 4bb87373dc
2 changed files with 1 additions and 16 deletions

View File

@ -21,7 +21,7 @@ script:
cd ./test_sites/ && cd ./test_sites/ &&
frappe --reinstall test_site && frappe --reinstall test_site &&
frappe --install_app erpnext test_site --verbose && frappe --install_app erpnext test_site --verbose &&
frappe --request '?cmd=erpnext.setup.page.setup_wizard.setup_wizard.setup_account&currency=USD&first_name=Test&last_name=User&company_name=Wind+Power+LLC&timezone=America/New_York&company_abbr=WP&industry=Manufacturing&country=United states&fy_start_date=2014-01-01&fy_end_date=2014-12-31&language=english&company_tagline=Testing&email=test@erpnext.com&password=test' test_site && frappe --request '?cmd=erpnext.setup.page.setup_wizard.setup_wizard.setup_account&currency=USD&first_name=Test&last_name=User&company_name=Wind+Power+LLC&timezone=America/New_York&company_abbr=WP&industry=Manufacturing&country=United States&fy_start_date=2014-01-01&fy_end_date=2014-12-31&language=english&company_tagline=Testing&email=test@erpnext.com&password=test' test_site &&
frappe --verbose --run_tests test_site --app erpnext frappe --verbose --run_tests test_site --app erpnext
before_script: before_script:

View File

@ -33,21 +33,6 @@ class website_maker(object):
}) })
}).insert() }).insert()
# about page
self.webpage = frappe.get_doc({
"doctype": "Web Page",
"title": self.company,
"published": 1,
"header": "<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>',
"description": self.company + ":" + (self.tagline or ""),
"css": frappe.get_template("setup/page/setup_wizard/sample_home_page.css").render(),
"main_section": frappe.get_template("setup/page/setup_wizard/sample_home_page.html").render({
"company": self.company, "tagline": (self.tagline or "")
})
}).insert()
def make_style_settings(self): def make_style_settings(self):
style_settings = frappe.get_doc("Style Settings", "Style Settings") style_settings = frappe.get_doc("Style Settings", "Style Settings")
style_settings.top_bar_background = "F2F2F2" style_settings.top_bar_background = "F2F2F2"