demo fixes
This commit is contained in:
parent
f63513ed38
commit
40b2b03bcb
@ -12,6 +12,7 @@ keydict = {
|
|||||||
"fiscal_year": "current_fiscal_year",
|
"fiscal_year": "current_fiscal_year",
|
||||||
'company': 'default_company',
|
'company': 'default_company',
|
||||||
'currency': 'default_currency',
|
'currency': 'default_currency',
|
||||||
|
"country": "country",
|
||||||
'hide_currency_symbol':'hide_currency_symbol',
|
'hide_currency_symbol':'hide_currency_symbol',
|
||||||
'account_url':'account_url',
|
'account_url':'account_url',
|
||||||
'disable_rounded_total': 'disable_rounded_total',
|
'disable_rounded_total': 'disable_rounded_total',
|
||||||
|
@ -8,6 +8,7 @@ import frappe
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
def after_install():
|
def after_install():
|
||||||
|
frappe.get_doc({'doctype': "Role", "role_name": "Analytics"}).insert()
|
||||||
import_country_and_currency()
|
import_country_and_currency()
|
||||||
from erpnext.accounts.doctype.chart_of_accounts.import_charts import import_charts
|
from erpnext.accounts.doctype.chart_of_accounts.import_charts import import_charts
|
||||||
import_charts()
|
import_charts()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe, os
|
import frappe
|
||||||
|
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import nowdate
|
from frappe.utils import nowdate
|
||||||
@ -22,13 +22,13 @@ class website_maker(object):
|
|||||||
"doctype": "Web Page",
|
"doctype": "Web Page",
|
||||||
"title": self.company,
|
"title": self.company,
|
||||||
"published": 1,
|
"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>'+_("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>',
|
||||||
"description": self.company + ":" + self.tagline,
|
"description": self.company + ":" + (self.tagline or ""),
|
||||||
"css": frappe.get_template("setup/page/setup_wizard/sample_home_page.css").render(),
|
"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({
|
"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()
|
}).insert()
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class website_maker(object):
|
|||||||
"title": _("General")
|
"title": _("General")
|
||||||
}).insert()
|
}).insert()
|
||||||
|
|
||||||
blog_post = frappe.get_doc({
|
frappe.get_doc({
|
||||||
"doctype": "Blog Post",
|
"doctype": "Blog Post",
|
||||||
"title": "Welcome",
|
"title": "Welcome",
|
||||||
"published": 1,
|
"published": 1,
|
||||||
|
@ -9,8 +9,6 @@ from frappe import _
|
|||||||
|
|
||||||
def install():
|
def install():
|
||||||
records = [
|
records = [
|
||||||
# role
|
|
||||||
{'doctype': "Role", "role_name": "Analytics"},
|
|
||||||
|
|
||||||
# item group
|
# item group
|
||||||
{'doctype': 'Item Group', 'item_group_name': _('All Item Groups'), 'is_group': 'Yes', 'parent_item_group': ''},
|
{'doctype': 'Item Group', 'item_group_name': _('All Item Groups'), 'is_group': 'Yes', 'parent_item_group': ''},
|
||||||
|
@ -9,6 +9,7 @@ from frappe import _
|
|||||||
from frappe.utils.file_manager import save_file
|
from frappe.utils.file_manager import save_file
|
||||||
from frappe.translate import set_default_language, get_dict, get_lang_dict
|
from frappe.translate import set_default_language, get_dict, get_lang_dict
|
||||||
from frappe.country_info import get_country_info
|
from frappe.country_info import get_country_info
|
||||||
|
from frappe.utils.nestedset import get_root_of
|
||||||
from default_website import website_maker
|
from default_website import website_maker
|
||||||
import install_fixtures
|
import install_fixtures
|
||||||
|
|
||||||
@ -134,7 +135,7 @@ def create_price_lists(args):
|
|||||||
"selling": 1 if pl_type == "Selling" else 0,
|
"selling": 1 if pl_type == "Selling" else 0,
|
||||||
"currency": args["currency"],
|
"currency": args["currency"],
|
||||||
"valid_for_territories": [{
|
"valid_for_territories": [{
|
||||||
"territory": frappe.db.get_value("Territory", {"parent_territory":""})
|
"territory": get_root_of("Territory")
|
||||||
}]
|
}]
|
||||||
}).insert()
|
}).insert()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user