From 4eaeda710d943ef01f50971e6f3fe5309a615ecb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 30 May 2016 16:33:01 +0530 Subject: [PATCH 1/3] Tax Rule based on County --- .../accounts/doctype/tax_rule/tax_rule.json | 108 +++++++++++++++++- erpnext/accounts/doctype/tax_rule/tax_rule.py | 8 +- .../utilities/doctype/address/address.json | 76 ++++++++---- 3 files changed, 163 insertions(+), 29 deletions(-) diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.json b/erpnext/accounts/doctype/tax_rule/tax_rule.json index 38e6805f0d..26e379b03c 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.json +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.json @@ -3,6 +3,7 @@ "allow_import": 1, "allow_rename": 0, "autoname": "TR.####", + "beta": 0, "creation": "2015-08-07 02:33:52.670866", "custom": 0, "docstatus": 0, @@ -18,6 +19,7 @@ "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, "label": "Tax Type", @@ -27,6 +29,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -42,6 +45,7 @@ "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Use for Shopping Cart", @@ -50,6 +54,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -65,6 +70,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -72,6 +78,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -88,6 +95,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Sales Tax Template", @@ -97,6 +105,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -113,6 +122,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Purchase Tax Template", @@ -122,6 +132,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -137,6 +148,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Filters", @@ -145,6 +157,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -161,6 +174,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Customer", @@ -170,6 +184,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -186,6 +201,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Supplier", @@ -195,6 +211,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -210,6 +227,7 @@ "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billing City", @@ -218,6 +236,32 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "billing_county", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Billing County", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -233,6 +277,7 @@ "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billing State", @@ -241,6 +286,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -256,6 +302,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billing Country", @@ -265,6 +312,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -280,6 +328,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -287,6 +336,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -303,6 +353,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Customer Group", @@ -312,6 +363,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -328,6 +380,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Supplier Type", @@ -337,6 +390,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -352,6 +406,7 @@ "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Shipping City", @@ -360,6 +415,32 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "shipping_county", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Shipping County", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -375,6 +456,7 @@ "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Shipping State", @@ -383,6 +465,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -398,6 +481,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Shipping Country", @@ -407,6 +491,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -422,6 +507,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Validity", @@ -430,6 +516,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -445,6 +532,7 @@ "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "From Date", @@ -453,6 +541,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -468,6 +557,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -475,6 +565,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -490,6 +581,7 @@ "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "To Date", @@ -498,6 +590,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -513,6 +606,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -520,6 +614,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -536,6 +631,7 @@ "fieldtype": "Int", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Priority", @@ -544,6 +640,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -559,6 +656,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -566,6 +664,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -581,6 +680,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Company", @@ -590,6 +690,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -600,13 +701,14 @@ ], "hide_heading": 0, "hide_toolbar": 0, + "idx": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2015-11-16 06:29:59.201327", + "modified": "2016-05-30 15:53:16.630072", "modified_by": "Administrator", "module": "Accounts", "name": "Tax Rule", @@ -634,8 +736,10 @@ "write": 1 } ], + "quick_entry": 1, "read_only": 0, "read_only_onload": 0, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index be6f4a47c2..7ec833e959 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -49,9 +49,11 @@ class TaxRule(Document): "supplier": self.supplier, "supplier_type": self.supplier_type, "billing_city": self.billing_city, + "billing_county": self.billing_county, "billing_state": self.billing_state, "billing_country": self.billing_country, "shipping_city": self.shipping_city, + "shipping_county": self.shipping_county, "shipping_state": self.shipping_state, "shipping_country": self.shipping_country, "company": self.company @@ -101,16 +103,18 @@ def get_party_details(party, party_type, args=None): billing_filters= {party_type: party, "is_primary_address": 1} shipping_filters= {party_type:party, "is_shipping_address": 1} - billing_address= frappe.get_all("Address", fields=["city", "state", "country"], filters= billing_filters) - shipping_address= frappe.get_all("Address", fields=["city", "state", "country"], filters= shipping_filters) + billing_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= billing_filters) + shipping_address= frappe.get_all("Address", fields=["city", "county", "state", "country"], filters= shipping_filters) if billing_address: out["billing_city"]= billing_address[0].city + out["billing_county"]= billing_address[0].county out["billing_state"]= billing_address[0].state out["billing_country"]= billing_address[0].country if shipping_address: out["shipping_city"]= shipping_address[0].city + out["shipping_county"]= shipping_address[0].county out["shipping_state"]= shipping_address[0].state out["shipping_country"]= shipping_address[0].country diff --git a/erpnext/utilities/doctype/address/address.json b/erpnext/utilities/doctype/address/address.json index 558e0b78fc..8ccf205750 100644 --- a/erpnext/utilities/doctype/address/address.json +++ b/erpnext/utilities/doctype/address/address.json @@ -2,6 +2,7 @@ "allow_copy": 0, "allow_import": 1, "allow_rename": 1, + "beta": 0, "creation": "2013-01-10 16:34:32", "custom": 0, "docstatus": 0, @@ -155,6 +156,31 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "county", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "County", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -179,30 +205,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "pincode", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 1, - "in_list_view": 0, - "label": "Postal Code", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -228,6 +230,30 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Postal Code", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -644,7 +670,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-04-15 03:09:31.497272", + "modified": "2016-05-30 14:20:47.284751", "modified_by": "Administrator", "module": "Utilities", "name": "Address", From 9a5cf6000ed2689821fb08c2e99d77e0f856286d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 31 May 2016 19:11:48 +0530 Subject: [PATCH 2/3] [fix] Test cases and editable fields settings for request for quotation --- .../accounts/report/balance_sheet/balance_sheet.py | 4 +++- .../doctype/purchase_common/purchase_common.js | 2 +- .../request_for_quotation/request_for_quotation.js | 13 +++++++++++++ .../request_for_quotation_supplier.json | 2 +- .../test_shopping_cart_settings.py | 2 ++ erpnext/shopping_cart/test_shopping_cart.py | 5 ++++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index d471da6d38..4efd098f76 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -64,7 +64,9 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company): def check_opening_balance(asset, liability, equity): # Check if previous year balance sheet closed - opening_balance = flt(asset[0].get("opening_balance", 0)) + opening_balance = 0 + if asset: + opening_balance = flt(asset[0].get("opening_balance", 0)) if liability: opening_balance -= flt(liability[0].get("opening_balance", 0)) if equity: diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index dbfda210b1..6416a239d2 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -12,7 +12,7 @@ cur_frm.email_field = "contact_email"; erpnext.buying.BuyingController = erpnext.TransactionController.extend({ setup: function() { this._super(); - if(!this.frm.get_field('items').grid.editable_fields){ + if(!in_list(["Material Request", "Request for Quotation"], this.frm.doc.doctype)){ this.frm.get_field('items').grid.editable_fields = [ {fieldname: 'item_code', columns: 4}, {fieldname: 'qty', columns: 2}, diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js index 72185315f1..5fb8b80335 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -14,6 +14,19 @@ frappe.ui.form.on("Request for Quotation",{ filters: {'supplier': d.supplier} } } + + frm.get_field('items').grid.editable_fields = [ + {fieldname: 'item_code', columns: 4}, + {fieldname: 'qty', columns: 2}, + {fieldname: 'schedule_date', columns: 2}, + {fieldname: 'warehouse', columns: 3}, + ]; + + frm.get_field('suppliers').grid.editable_fields = [ + {fieldname: 'supplier', columns: 5}, + {fieldname: 'contact', columns: 3}, + {fieldname: 'email_id', columns: 3} + ]; }, onload: function(frm){ diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json index d9b34eb556..3399b51aef 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json @@ -147,7 +147,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-05-10 11:36:04.171180", + "modified": "2016-05-31 19:08:15.397706", "modified_by": "Administrator", "module": "Buying", "name": "Request for Quotation Supplier", diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py index 10bbcfe85a..390bc27568 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py @@ -36,4 +36,6 @@ class TestShoppingCartSettings(unittest.TestCase): cart_settings.enabled = 1 if not frappe.db.get_value("Tax Rule", {"use_for_shopping_cart": 1}, "name"): self.assertRaises(ShoppingCartSetupError, cart_settings.validate_tax_rule) + + frappe.db.sql("update `tabTax Rule` set use_for_shopping_cart = 1") diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py index a51852a454..6eb8e49789 100644 --- a/erpnext/shopping_cart/test_shopping_cart.py +++ b/erpnext/shopping_cart/test_shopping_cart.py @@ -101,7 +101,7 @@ class TestShoppingCart(unittest.TestCase): quotation = self.create_quotation() from erpnext.accounts.party import set_taxes - + tax_rule_master = set_taxes(quotation.customer, "Customer", \ quotation.transaction_date, quotation.company, None, None, \ quotation.customer_address, quotation.shipping_address_name, 1) @@ -131,6 +131,9 @@ class TestShoppingCart(unittest.TestCase): "taxes": frappe.get_doc("Sales Taxes and Charges Template", "_Test Tax 1").taxes, "company": "_Test Company" } + + for d in values["taxes"]: + d.name = None quotation.update(values) From 29d85b0ab8732f8083a3b260d202222fcd7885db Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 1 Jun 2016 12:54:18 +0530 Subject: [PATCH 3/3] test case fixed --- erpnext/setup/setup_wizard/setup_wizard.py | 2 ++ erpnext/shopping_cart/test_shopping_cart.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index a0df8d4636..e3e47aed70 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -56,6 +56,8 @@ def setup_complete(args=None): pass def update_setup_wizard_access(): + if frappe.flags.in_test: + return setup_wizard = frappe.get_doc('Page', 'setup-wizard') for roles in setup_wizard.roles: if roles.role == 'System Manager': diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py index 6eb8e49789..528223151c 100644 --- a/erpnext/shopping_cart/test_shopping_cart.py +++ b/erpnext/shopping_cart/test_shopping_cart.py @@ -131,9 +131,6 @@ class TestShoppingCart(unittest.TestCase): "taxes": frappe.get_doc("Sales Taxes and Charges Template", "_Test Tax 1").taxes, "company": "_Test Company" } - - for d in values["taxes"]: - d.name = None quotation.update(values)