From a13c60bf9f240fc5e49367495ace59fef50492e8 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Sep 2015 10:43:43 +0530 Subject: [PATCH 1/3] [minor] fix title in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d91136f3ff5..8be3f22b1e9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ERPNext - Open source ERP for small and medium-size business [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext) +# ERPNext - ERP made simple -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/frappe/erpnext?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/frappe/erpnext?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [https://erpnext.com](https://erpnext.com) From 5a803d76ada91514b39980ac58f8aa10e71071be Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 Sep 2015 13:20:35 +0530 Subject: [PATCH 2/3] [fix] Bypass Root Not Editable validation from Setup Wizard --- erpnext/accounts/doctype/account/account.py | 4 +++- erpnext/setup/page/setup_wizard/setup_wizard.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 46f75208fc6..16d25010e38 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -7,6 +7,8 @@ from frappe.utils import cstr, cint from frappe import throw, _ from frappe.model.document import Document +class RootNotEditable(frappe.ValidationError): pass + class Account(Document): nsm_parent_field = 'parent_account' @@ -67,7 +69,7 @@ class Account(Document): # does not exists parent if frappe.db.exists("Account", self.name): if not frappe.db.get_value("Account", self.name, "parent_account"): - throw(_("Root cannot be edited.")) + throw(_("Root cannot be edited."), RootNotEditable) def validate_frozen_accounts_modifier(self): old_value = frappe.db.get_value("Account", self.name, "freeze_account") diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py index e578f877669..77ad90a0b77 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.py +++ b/erpnext/setup/page/setup_wizard/setup_wizard.py @@ -15,6 +15,7 @@ from .default_website import website_maker import install_fixtures from .sample_data import make_sample_data from erpnext.accounts.utils import FiscalYearError +from erpnext.accounts.doctype.account.account import RootNotEditable @frappe.whitelist() def setup_account(args=None): @@ -303,6 +304,7 @@ def get_fy_details(fy_start_date, fy_end_date): return fy def create_taxes(args): + for i in xrange(1,6): if args.get("tax_" + str(i)): # replace % in case someone also enters the % symbol @@ -320,6 +322,9 @@ def create_taxes(args): pass else: raise + except RootNotEditable, e: + pass + def make_tax_head(args, i, tax_group, tax_rate): return frappe.get_doc({ "doctype":"Account", From 793b87948c3c0a3739a46689fa2bcdf6dbc53f07 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Sep 2015 18:10:15 +0530 Subject: [PATCH 3/3] [fix] [patch] item template attributes --- erpnext/patches/v5_7/item_template_attributes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v5_7/item_template_attributes.py b/erpnext/patches/v5_7/item_template_attributes.py index 9536f1628ca..9f141b5b08b 100644 --- a/erpnext/patches/v5_7/item_template_attributes.py +++ b/erpnext/patches/v5_7/item_template_attributes.py @@ -72,8 +72,6 @@ def migrate_item_variants(): for attribute, value in item_attributes: attribute_value_options.setdefault(attribute, []).append(value) - save_attributes_in_template(item, attribute_value_options) - possible_combinations = get_possible_combinations(attribute_value_options) for variant in all_variants: @@ -89,6 +87,8 @@ def migrate_item_variants(): save_attributes_in_variant(variant, combination) break + save_attributes_in_template(item, attribute_value_options) + frappe.delete_doc("DocType", "Item Variant") def save_attributes_in_template(item, attribute_value_options):