demo fixes

This commit is contained in:
Rushabh Mehta 2014-04-21 13:43:11 +05:30
parent f63513ed38
commit 40b2b03bcb
5 changed files with 9 additions and 8 deletions

View File

@ -12,6 +12,7 @@ keydict = {
"fiscal_year": "current_fiscal_year",
'company': 'default_company',
'currency': 'default_currency',
"country": "country",
'hide_currency_symbol':'hide_currency_symbol',
'account_url':'account_url',
'disable_rounded_total': 'disable_rounded_total',

View File

@ -8,6 +8,7 @@ import frappe
from frappe import _
def after_install():
frappe.get_doc({'doctype': "Role", "role_name": "Analytics"}).insert()
import_country_and_currency()
from erpnext.accounts.doctype.chart_of_accounts.import_charts import import_charts
import_charts()

View File

@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, os
import frappe
from frappe import _
from frappe.utils import nowdate
@ -22,13 +22,13 @@ class website_maker(object):
"doctype": "Web Page",
"title": self.company,
"published": 1,
"header": "<h1>{0}</h1>".format(self.tagline)+\
"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,
"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
"company": self.company, "tagline": (self.tagline or "")
})
}).insert()
@ -73,7 +73,7 @@ class website_maker(object):
"title": _("General")
}).insert()
blog_post = frappe.get_doc({
frappe.get_doc({
"doctype": "Blog Post",
"title": "Welcome",
"published": 1,

View File

@ -9,8 +9,6 @@ from frappe import _
def install():
records = [
# role
{'doctype': "Role", "role_name": "Analytics"},
# item group
{'doctype': 'Item Group', 'item_group_name': _('All Item Groups'), 'is_group': 'Yes', 'parent_item_group': ''},

View File

@ -9,6 +9,7 @@ from frappe import _
from frappe.utils.file_manager import save_file
from frappe.translate import set_default_language, get_dict, get_lang_dict
from frappe.country_info import get_country_info
from frappe.utils.nestedset import get_root_of
from default_website import website_maker
import install_fixtures
@ -134,7 +135,7 @@ def create_price_lists(args):
"selling": 1 if pl_type == "Selling" else 0,
"currency": args["currency"],
"valid_for_territories": [{
"territory": frappe.db.get_value("Territory", {"parent_territory":""})
"territory": get_root_of("Territory")
}]
}).insert()