From f830b57fd481d46973b6874387529394fe659539 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 7 Jun 2022 15:23:32 +0530 Subject: [PATCH 1/4] test: sales register report with conditions --- erpnext/accounts/report/sales_register/sales_register.py | 4 ++-- erpnext/accounts/test/test_reports.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 777d96ced1..33bd3c7496 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -367,8 +367,8 @@ def get_conditions(filters): if not filters.get(field) or field in accounting_dimensions_list: return "" return f""" and exists(select name from `tab{table}` - where parent=`tabSales Invoice`.name - and ifnull(`tab{table}`.{field}, '') = %({field})s)""" + where parent=`tabSales Invoice`.name + and ifnull(`tab{table}`.{field}, '') = %({field})s)""" conditions += get_sales_invoice_item_field_condition("mode_of_payments", "Sales Invoice Payment") conditions += get_sales_invoice_item_field_condition("cost_center") diff --git a/erpnext/accounts/test/test_reports.py b/erpnext/accounts/test/test_reports.py index 19fe74fffc..3f06c30adb 100644 --- a/erpnext/accounts/test/test_reports.py +++ b/erpnext/accounts/test/test_reports.py @@ -28,6 +28,7 @@ REPORT_FILTER_TEST_CASES: List[Tuple[ReportName, ReportFilters]] = [ ("Item-wise Sales Register", {}), ("Item-wise Purchase Register", {}), ("Sales Register", {}), + ("Sales Register", {"item_group": "All Item Groups"}), ("Purchase Register", {}), ( "Tax Detail", From fb4f8d870be85037df1fd416be8fb93c1a85231f Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Wed, 8 Jun 2022 09:36:33 +0530 Subject: [PATCH 2/4] fix(india): e-invoice eligibility if company gstin is not configured (#31247) --- erpnext/regional/india/e_invoice/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 9add09beaf..5eb14a5ddd 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -55,6 +55,9 @@ def validate_eligibility(doc): return False invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")}) + invalid_company_gstin = not frappe.db.get_value( + "E Invoice User", {"gstin": doc.get("company_gstin")} + ) invalid_supply_type = doc.get("gst_category") not in [ "Registered Regular", "Registered Composition", @@ -71,6 +74,7 @@ def validate_eligibility(doc): if ( invalid_company + or invalid_company_gstin or invalid_supply_type or company_transaction or no_taxes_applied From 2832731601920b07c7083a20c49868e866640add Mon Sep 17 00:00:00 2001 From: Marica Date: Wed, 8 Jun 2022 15:52:13 +0530 Subject: [PATCH 3/4] fix: Use `frappe.as_unicode` to decode output of redis module list (#31282) - As of redis 7, a list is added to the result of fetching the module list - This list cannot be "decoded",so use `frappe.as_unicode` that handles bytes as well as other types --- erpnext/e_commerce/redisearch_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/e_commerce/redisearch_utils.py b/erpnext/e_commerce/redisearch_utils.py index 61b4b9ee1f..1f649c7b48 100644 --- a/erpnext/e_commerce/redisearch_utils.py +++ b/erpnext/e_commerce/redisearch_utils.py @@ -38,7 +38,7 @@ def is_search_module_loaded(): out = cache.execute_command("MODULE LIST") parsed_output = " ".join( - (" ".join([s.decode() for s in o if not isinstance(s, int)]) for o in out) + (" ".join([frappe.as_unicode(s) for s in o if not isinstance(s, int)]) for o in out) ) return "search" in parsed_output except Exception: From 5c6937865cf8e54b52012f3dbefdb536f07586d7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 8 Jun 2022 16:30:44 +0530 Subject: [PATCH 4/4] fix(ux): Add tabs in Item --- .../module_onboarding/accounts/accounts.json | 2 +- .../chart_of_accounts/chart_of_accounts.json | 6 +- .../setup_taxes/setup_taxes.json | 4 +- .../setup/module_onboarding/home/home.json | 2 +- .../data_import/data_import.json | 4 +- .../navigation_help/navigation_help.json | 2 +- erpnext/stock/doctype/item/item.json | 130 ++++++++---------- 7 files changed, 70 insertions(+), 80 deletions(-) diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json index aa7cdf788b..b9040e3309 100644 --- a/erpnext/accounts/module_onboarding/accounts/accounts.json +++ b/erpnext/accounts/module_onboarding/accounts/accounts.json @@ -13,7 +13,7 @@ "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts", "idx": 0, "is_complete": 0, - "modified": "2022-01-18 18:35:52.326688", + "modified": "2022-06-07 14:29:21.352132", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts", diff --git a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json index 67553baec7..0973ab3962 100644 --- a/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json +++ b/erpnext/accounts/onboarding_step/chart_of_accounts/chart_of_accounts.json @@ -1,8 +1,8 @@ { - "action": "Watch Video", + "action": "Go to Page", "action_label": "Learn more about Chart of Accounts", "callback_message": "You can continue with the onboarding after exploring this page", - "callback_title": "Awesome Work", + "callback_title": "Explore Chart of Accounts", "creation": "2020-05-13 19:58:20.928127", "description": "# Chart Of Accounts\n\nERPNext sets up a simple chart of accounts for each Company you create, but you can modify it according to business and legal requirements.", "docstatus": 0, @@ -12,7 +12,7 @@ "is_complete": 0, "is_single": 0, "is_skipped": 0, - "modified": "2021-08-13 11:46:25.878506", + "modified": "2022-06-07 14:21:26.264769", "modified_by": "Administrator", "name": "Chart of Accounts", "owner": "Administrator", diff --git a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json index 9f4c873e34..b6e9f5cd87 100644 --- a/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json +++ b/erpnext/accounts/onboarding_step/setup_taxes/setup_taxes.json @@ -2,14 +2,14 @@ "action": "Create Entry", "action_label": "Manage Sales Tax Templates", "creation": "2020-05-13 19:29:43.844463", - "description": "# Setting up Taxes\n\nERPNext lets you configure your taxes so that they are automatically applied in your buying and selling transactions. You can configure them globally or even on Items. ERPNext taxes are pre-configured for most regions.\n", + "description": "# Setting up Taxes\n\nERPNext lets you configure your taxes so that they are automatically applied in your buying and selling transactions. You can configure them globally or even on Items. ERPNext taxes are pre-configured for most regions.\n\n[Checkout pre-configured taxes](/app/sales-taxes-and-charges-template)\n", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, "is_single": 0, "is_skipped": 0, - "modified": "2021-08-13 11:48:37.238610", + "modified": "2022-06-07 14:27:15.906286", "modified_by": "Administrator", "name": "Setup Taxes", "owner": "Administrator", diff --git a/erpnext/setup/module_onboarding/home/home.json b/erpnext/setup/module_onboarding/home/home.json index 1b2dbc6fea..f02fc454c0 100644 --- a/erpnext/setup/module_onboarding/home/home.json +++ b/erpnext/setup/module_onboarding/home/home.json @@ -25,7 +25,7 @@ "documentation_url": "https://docs.erpnext.com/docs/v13/user/manual/en/setting-up/company-setup", "idx": 0, "is_complete": 0, - "modified": "2021-12-15 14:23:52.460913", + "modified": "2022-06-07 14:31:00.575193", "modified_by": "Administrator", "module": "Setup", "name": "Home", diff --git a/erpnext/setup/onboarding_step/data_import/data_import.json b/erpnext/setup/onboarding_step/data_import/data_import.json index 48741dca01..4999a368d3 100644 --- a/erpnext/setup/onboarding_step/data_import/data_import.json +++ b/erpnext/setup/onboarding_step/data_import/data_import.json @@ -2,14 +2,14 @@ "action": "Watch Video", "action_label": "Learn more about data migration", "creation": "2021-05-19 05:29:16.809610", - "description": "# Import Data from Spreadsheet\n\nIn ERPNext, you can easily migrate your historical data using spreadsheets. You can use it for migrating not just masters (like Customer, Supplier, Items), but also for transactions like (outstanding invoices, opening stock and accounting entries, etc). If you are migrating from [Tally](https://tallysolutions.com/) or [Quickbooks](https://quickbooks.intuit.com/in/), we got special migration tools for you.", + "description": "# Import Data from Spreadsheet\n\nIn ERPNext, you can easily migrate your historical data using spreadsheets. You can use it for migrating not just masters (like Customer, Supplier, Items), but also for transactions like (outstanding invoices, opening stock and accounting entries, etc).", "docstatus": 0, "doctype": "Onboarding Step", "idx": 0, "is_complete": 0, "is_single": 0, "is_skipped": 0, - "modified": "2021-12-15 13:10:57.346422", + "modified": "2022-06-07 14:28:51.390813", "modified_by": "Administrator", "name": "Data import", "owner": "Administrator", diff --git a/erpnext/setup/onboarding_step/navigation_help/navigation_help.json b/erpnext/setup/onboarding_step/navigation_help/navigation_help.json index 388853df79..cf07968bc7 100644 --- a/erpnext/setup/onboarding_step/navigation_help/navigation_help.json +++ b/erpnext/setup/onboarding_step/navigation_help/navigation_help.json @@ -9,7 +9,7 @@ "is_complete": 0, "is_single": 0, "is_skipped": 0, - "modified": "2021-12-15 14:20:55.441678", + "modified": "2022-06-07 14:28:00.901082", "modified_by": "Administrator", "name": "Navigation Help", "owner": "Administrator", diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 4f3e842995..2f6d4fb783 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -11,7 +11,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "name_and_description_section", + "details", "naming_series", "item_code", "variant_of", @@ -35,11 +35,11 @@ "over_billing_allowance", "image", "section_break_11", - "brand", "description", - "sb_barcodes", - "barcodes", + "brand", + "dashboard_tab", "inventory_section", + "inventory_settings_section", "shelf_life_in_days", "end_of_life", "default_material_request_type", @@ -49,6 +49,8 @@ "weight_per_unit", "weight_uom", "allow_negative_stock", + "sb_barcodes", + "barcodes", "reorder_section", "reorder_levels", "unit_of_measure_conversion", @@ -67,13 +69,13 @@ "has_variants", "variant_based_on", "attributes", - "defaults", + "accounting", "item_defaults", - "purchase_details", - "is_purchase_item", + "purchasing_tab", "purchase_uom", "min_order_qty", "safety_stock", + "is_purchase_item", "purchase_details_cb", "lead_time_days", "last_purchase_rate", @@ -83,33 +85,31 @@ "delivered_by_supplier", "column_break2", "supplier_items", + "deferred_expense_section", + "enable_deferred_expense", + "deferred_expense_account", + "no_of_months_exp", "foreign_trade_details", "country_of_origin", "column_break_59", "customs_tariff_number", "sales_details", "sales_uom", - "is_sales_item", "grant_commission", + "is_sales_item", "column_break3", "max_discount", "deferred_revenue", - "deferred_revenue_account", "enable_deferred_revenue", - "column_break_85", + "deferred_revenue_account", "no_of_months", - "deferred_expense_section", - "deferred_expense_account", - "enable_deferred_expense", - "column_break_88", - "no_of_months_exp", "customer_details", "customer_items", "item_tax_section_break", "taxes", - "inspection_criteria", - "quality_inspection_template", + "quality_tab", "inspection_required_before_purchase", + "quality_inspection_template", "inspection_required_before_delivery", "manufacturing", "default_bom", @@ -118,17 +118,10 @@ "customer_code", "default_item_manufacturer", "default_manufacturer_part_no", - "more_information_section", "published_in_website", "total_projected_qty" ], "fields": [ - { - "fieldname": "name_and_description_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-flag" - }, { "fieldname": "naming_series", "fieldtype": "Select", @@ -315,7 +308,7 @@ "collapsible_depends_on": "is_stock_item", "depends_on": "is_stock_item", "fieldname": "inventory_section", - "fieldtype": "Section Break", + "fieldtype": "Tab Break", "label": "Inventory", "oldfieldtype": "Section Break", "options": "fa fa-truck" @@ -514,31 +507,17 @@ "label": "Attributes", "options": "Item Variant Attribute" }, - { - "depends_on": "eval:!doc.is_fixed_asset", - "fieldname": "defaults", - "fieldtype": "Section Break", - "label": "Sales, Purchase, Accounting Defaults" - }, { "fieldname": "item_defaults", "fieldtype": "Table", "label": "Item Defaults", "options": "Item Default" }, - { - "collapsible": 1, - "fieldname": "purchase_details", - "fieldtype": "Section Break", - "label": "Purchase, Replenishment Details", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, { "default": "1", "fieldname": "is_purchase_item", "fieldtype": "Check", - "label": "Is Purchase Item" + "label": "Allow Purchase" }, { "fieldname": "purchase_uom", @@ -646,8 +625,8 @@ { "collapsible": 1, "fieldname": "sales_details", - "fieldtype": "Section Break", - "label": "Sales Details", + "fieldtype": "Tab Break", + "label": "Sales", "oldfieldtype": "Section Break", "options": "fa fa-tag" }, @@ -661,7 +640,7 @@ "default": "1", "fieldname": "is_sales_item", "fieldtype": "Check", - "label": "Is Sales Item" + "label": "Allow Sales" }, { "fieldname": "column_break3", @@ -696,10 +675,6 @@ "fieldtype": "Check", "label": "Enable Deferred Revenue" }, - { - "fieldname": "column_break_85", - "fieldtype": "Column Break" - }, { "depends_on": "enable_deferred_revenue", "fieldname": "no_of_months", @@ -726,10 +701,6 @@ "fieldtype": "Check", "label": "Enable Deferred Expense" }, - { - "fieldname": "column_break_88", - "fieldtype": "Column Break" - }, { "depends_on": "enable_deferred_expense", "fieldname": "no_of_months_exp", @@ -753,8 +724,8 @@ "collapsible": 1, "collapsible_depends_on": "taxes", "fieldname": "item_tax_section_break", - "fieldtype": "Section Break", - "label": "Item Tax", + "fieldtype": "Tab Break", + "label": "Tax", "oldfieldtype": "Section Break", "options": "fa fa-money" }, @@ -767,15 +738,6 @@ "oldfieldtype": "Table", "options": "Item Tax" }, - { - "collapsible": 1, - "depends_on": "eval:!doc.is_fixed_asset", - "fieldname": "inspection_criteria", - "fieldtype": "Section Break", - "label": "Inspection Criteria", - "oldfieldtype": "Section Break", - "options": "fa fa-search" - }, { "default": "0", "fieldname": "inspection_required_before_purchase", @@ -801,7 +763,7 @@ "collapsible": 1, "depends_on": "is_stock_item", "fieldname": "manufacturing", - "fieldtype": "Section Break", + "fieldtype": "Tab Break", "label": "Manufacturing", "oldfieldtype": "Section Break", "options": "fa fa-cogs" @@ -880,12 +842,6 @@ "label": "Default Manufacturer Part No", "read_only": 1 }, - { - "collapsible": 1, - "fieldname": "more_information_section", - "fieldtype": "Section Break", - "label": "More Information" - }, { "default": "0", "depends_on": "published_in_website", @@ -912,6 +868,40 @@ "fieldname": "allow_negative_stock", "fieldtype": "Check", "label": "Allow Negative Stock" + }, + { + "fieldname": "inventory_settings_section", + "fieldtype": "Section Break", + "label": "Inventory Settings" + }, + { + "fieldname": "purchasing_tab", + "fieldtype": "Tab Break", + "label": "Purchasing" + }, + { + "fieldname": "quality_tab", + "fieldtype": "Tab Break", + "label": "Quality" + }, + { + "fieldname": "details", + "fieldtype": "Tab Break", + "label": "Details", + "oldfieldtype": "Section Break", + "options": "fa fa-flag" + }, + { + "fieldname": "dashboard_tab", + "fieldtype": "Tab Break", + "label": "Dashboard", + "show_dashboard": 1 + }, + { + "depends_on": "eval:!doc.is_fixed_asset", + "fieldname": "accounting", + "fieldtype": "Tab Break", + "label": "Accounting" } ], "icon": "fa fa-tag", @@ -919,7 +909,7 @@ "image_field": "image", "index_web_pages_for_search": 1, "links": [], - "modified": "2022-04-28 04:52:10.272256", + "modified": "2022-06-08 11:35:20.094546", "modified_by": "Administrator", "module": "Stock", "name": "Item",