From 4448e2d66bb224deee3a6dda181a358223d3c480 Mon Sep 17 00:00:00 2001 From: NahuelOperto Date: Fri, 21 Jun 2019 08:50:37 -0300 Subject: [PATCH 01/11] fix order in general ledger --- erpnext/accounts/report/general_ledger/general_ledger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 1c5e089534..2924907e8f 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -11,6 +11,7 @@ from erpnext.accounts.utils import get_account_currency from erpnext.accounts.report.financial_statements import get_cost_centers_with_children from six import iteritems from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions +from collections import OrderedDict def execute(filters=None): if not filters: @@ -267,7 +268,7 @@ def group_by_field(group_by): return 'voucher_no' def initialize_gle_map(gl_entries, filters): - gle_map = frappe._dict() + gle_map = OrderedDict() group_by = group_by_field(filters.get('group_by')) for gle in gl_entries: From b315acb5a7b4c77f7ff5ca677d2c3c6854e13abe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 12 Jul 2019 14:27:19 +0530 Subject: [PATCH 02/11] fix: Calculate taxes and totals only if items added in transaction --- erpnext/controllers/taxes_and_totals.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index ebbe3d9d27..8e1510a836 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -15,6 +15,9 @@ class calculate_taxes_and_totals(object): self.calculate() def calculate(self): + if not len(self.doc.get("items")): + return + self.discount_amount_applied = False self._calculate() From 8412f847d4ae0e7e8836ca14e4758fcfef012ffa Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 12 Jul 2019 15:44:58 +0530 Subject: [PATCH 03/11] fix: dr / cr label for balance of the ledgers in the account tree --- erpnext/accounts/doctype/account/account_tree.js | 2 +- erpnext/accounts/utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index dc4c69d9e8..b70c6d2b27 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -121,7 +121,7 @@ frappe.treeview_settings["Account"] = { }, onrender: function(node) { if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){ - var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr"; + var dr_or_cr = in_list(["Liability", "Income", "Equity"], node.data.root_type) ? "Cr" : "Dr"; if (node.data && node.data.balance!==undefined) { $('' + (node.data.balance_in_account_currency ? diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 542c7e4e52..e75dd957db 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -734,6 +734,7 @@ def get_children(doctype, parent, company, is_root=False): parent_fieldname = 'parent_' + doctype.lower().replace(' ', '_') fields = [ 'name as value', + 'root_type', 'is_group as expandable' ] filters = [['docstatus', '<', 2]] @@ -741,7 +742,7 @@ def get_children(doctype, parent, company, is_root=False): filters.append(['ifnull(`{0}`,"")'.format(parent_fieldname), '=', '' if is_root else parent]) if is_root: - fields += ['root_type', 'report_type', 'account_currency'] if doctype == 'Account' else [] + fields += ['report_type', 'account_currency'] if doctype == 'Account' else [] filters.append(['company', '=', company]) else: From 625ec43fc91f075689f288a7100699eee385aaa6 Mon Sep 17 00:00:00 2001 From: karthikeyan5 Date: Fri, 12 Jul 2019 15:57:37 +0530 Subject: [PATCH 04/11] fix(auto attendance): Prevent marking attendance for the ongoing shift --- erpnext/hr/doctype/shift_type/shift_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/shift_type/shift_type.py b/erpnext/hr/doctype/shift_type/shift_type.py index eaf6b1e2d3..b98f445c0f 100644 --- a/erpnext/hr/doctype/shift_type/shift_type.py +++ b/erpnext/hr/doctype/shift_type/shift_type.py @@ -22,7 +22,7 @@ class ShiftType(Document): 'skip_auto_attendance':'0', 'attendance':('is', 'not set'), 'time':('>=', self.process_attendance_after), - 'shift_actual_start': ('<', self.last_sync_of_checkin), + 'shift_actual_end': ('<', self.last_sync_of_checkin), 'shift': self.name } logs = frappe.db.get_list('Employee Checkin', fields="*", filters=filters, order_by="employee,time") From dc02f4d07d2f002247811f0138755e1f1bc31d16 Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Sat, 13 Jul 2019 20:00:25 +0530 Subject: [PATCH 05/11] fix: miscellaneous fixes --- .../quality_feedback_parameter.json | 4 ++-- .../doctype/quality_meeting/quality_meeting.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.json b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.json index d0b368f293..5bd8920a32 100644 --- a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.json +++ b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.json @@ -28,7 +28,7 @@ "fieldtype": "Select", "in_list_view": 1, "label": "Rating", - "options": "1\n2\n3\n4\n5", + "options": "\n1\n2\n3\n4\n5", "reqd": 1 }, { @@ -44,7 +44,7 @@ } ], "istable": 1, - "modified": "2019-05-26 21:50:48.951264", + "modified": "2019-07-13 19:58:08.966141", "modified_by": "Administrator", "module": "Quality Management", "name": "Quality Feedback Parameter", diff --git a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.json b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.json index 6985632e49..0849fd7aeb 100644 --- a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.json +++ b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.json @@ -26,7 +26,7 @@ "fieldname": "status", "fieldtype": "Select", "label": "Status", - "options": "Open\nClose" + "options": "Open\nClosed" }, { "fieldname": "minutes", @@ -55,7 +55,7 @@ "label": "Minutes" } ], - "modified": "2019-05-26 23:12:23.364357", + "modified": "2019-07-13 19:57:40.500541", "modified_by": "Administrator", "module": "Quality Management", "name": "Quality Meeting", From 6abb63b445ffbd867686fd436eeef97e834ab7c6 Mon Sep 17 00:00:00 2001 From: Michelle Alva <50285544+michellealva@users.noreply.github.com> Date: Mon, 15 Jul 2019 14:00:00 +0530 Subject: [PATCH 06/11] refactor: Refactor module links of Accounting, HR, Project (#18160) --- erpnext/config/accounting.py | 608 +++++++++++++++++------------------ erpnext/config/buying.py | 26 +- erpnext/config/hr.py | 514 ++++++++++++++--------------- erpnext/config/projects.py | 12 +- erpnext/config/selling.py | 38 +-- erpnext/config/stock.py | 42 +-- 6 files changed, 565 insertions(+), 675 deletions(-) diff --git a/erpnext/config/accounting.py b/erpnext/config/accounting.py index ce1384aae7..ab75f211c0 100644 --- a/erpnext/config/accounting.py +++ b/erpnext/config/accounting.py @@ -6,11 +6,12 @@ import frappe def get_data(): config = [ { - "label": _("Masters and Accounts"), + "label": _("Accounts Receivable"), "items": [ { "type": "doctype", - "name": "Item", + "name": "Sales Invoice", + "description": _("Bills raised to Customers."), "onboard": 1, }, { @@ -19,12 +20,115 @@ def get_data(): "description": _("Customer database."), "onboard": 1, }, + { + "type": "doctype", + "name": "Payment Entry", + "description": _("Bank/Cash transactions against party or for internal transfer") + }, + { + "type": "doctype", + "name": "Payment Request", + "description": _("Payment Request"), + }, + { + "type": "report", + "name": "Accounts Receivable", + "doctype": "Sales Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Accounts Receivable Summary", + "doctype": "Sales Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Sales Register", + "doctype": "Sales Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Item-wise Sales Register", + "is_query_report": True, + "doctype": "Sales Invoice" + }, + { + "type": "report", + "name": "Ordered Items To Be Billed", + "is_query_report": True, + "doctype": "Sales Invoice" + }, + { + "type": "report", + "name": "Delivered Items To Be Billed", + "is_query_report": True, + "doctype": "Sales Invoice" + }, + ] + }, + { + "label": _("Accounts Payable"), + "items": [ + { + "type": "doctype", + "name": "Purchase Invoice", + "description": _("Bills raised by Suppliers."), + "onboard": 1 + }, { "type": "doctype", "name": "Supplier", "description": _("Supplier database."), "onboard": 1, }, + { + "type": "doctype", + "name": "Payment Entry", + "description": _("Bank/Cash transactions against party or for internal transfer") + }, + { + "type": "report", + "name": "Accounts Payable", + "doctype": "Purchase Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Accounts Payable Summary", + "doctype": "Purchase Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Purchase Register", + "doctype": "Purchase Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Item-wise Purchase Register", + "is_query_report": True, + "doctype": "Purchase Invoice" + }, + { + "type": "report", + "name": "Purchase Order Items To Be Billed", + "is_query_report": True, + "doctype": "Purchase Invoice" + }, + { + "type": "report", + "name": "Received Items To Be Billed", + "is_query_report": True, + "doctype": "Purchase Invoice" + }, + ] + }, + { + "label": _("Accounting Masters"), + "items": [ { "type": "doctype", "name": "Company", @@ -40,201 +144,31 @@ def get_data(): "description": _("Tree of financial accounts."), "onboard": 1, }, - ] - }, - { - "label": _("Billing"), - "items": [ - { - "type": "doctype", - "name": "Sales Invoice", - "description": _("Bills raised to Customers."), - "onboard": 1, - }, - { - "type": "doctype", - "name": "Purchase Invoice", - "description": _("Bills raised by Suppliers."), - "onboard": 1 - }, - { - "type": "doctype", - "name": "Payment Request", - "description": _("Payment Request"), - }, - { - "type": "doctype", - "name": "Payment Term", - "description": _("Payment Terms based on conditions") - }, - - # Reports - { - "type": "report", - "name": "Ordered Items To Be Billed", - "is_query_report": True, - "reference_doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Delivered Items To Be Billed", - "is_query_report": True, - "reference_doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Purchase Order Items To Be Billed", - "is_query_report": True, - "reference_doctype": "Purchase Invoice" - }, - { - "type": "report", - "name": "Received Items To Be Billed", - "is_query_report": True, - "reference_doctype": "Purchase Invoice" - }, - ] - - }, - { - "label": _("Settings"), - "icon": "fa fa-cog", - "items": [ { "type": "doctype", "name": "Accounts Settings", - "description": _("Default settings for accounting transactions.") }, { "type": "doctype", "name": "Fiscal Year", "description": _("Financial / accounting year.") }, - { - "type": "doctype", - "name": "Currency", - "description": _("Enable / disable currencies.") - }, - { - "type": "doctype", - "name": "Currency Exchange", - "description": _("Currency exchange rate master.") - }, - { - "type": "doctype", - "name": "Exchange Rate Revaluation", - "description": _("Exchange Rate Revaluation master.") - }, - { - "type": "doctype", - "name": "Payment Gateway Account", - "description": _("Setup Gateway accounts.") - }, - { - "type": "doctype", - "name": "Terms and Conditions", - "label": _("Terms and Conditions Template"), - "description": _("Template of terms or contract.") - }, - { - "type": "doctype", - "name": "Mode of Payment", - "description": _("e.g. Bank, Cash, Credit Card") - }, - { - "type": "doctype", - "name": "Auto Repeat", - "label": _("Auto Repeat"), - "description": _("To make recurring documents") - }, - { - "type": "doctype", - "name": "C-Form", - "description": _("C-Form records"), - "country": "India" - }, - { - "type": "doctype", - "name": "Cheque Print Template", - "description": _("Setup cheque dimensions for printing") - }, { "type": "doctype", "name": "Accounting Dimension", - "description": _("Setup custom dimensions for accounting") }, { "type": "doctype", - "name": "Opening Invoice Creation Tool", - "description": _("Create Opening Sales and Purchase Invoices") - } - ] - }, - { - "label": _("Accounting Entries"), - "items": [ - { - "type": "doctype", - "name": "Payment Entry", - "description": _("Bank/Cash transactions against party or for internal transfer") + "name": "Finance Book", }, { "type": "doctype", - "name": "Journal Entry", - "description": _("Accounting journal entries.") - } - ] - }, - { - "label": _("Financial Statements"), - "items": [ - { - "type": "report", - "name": "General Ledger", - "doctype": "GL Entry", - "is_query_report": True, + "name": "Accounting Period", }, { - "type": "report", - "name": "Accounts Receivable", - "doctype": "Sales Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Accounts Payable", - "doctype": "Purchase Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Trial Balance", - "doctype": "GL Entry", - "is_query_report": True, - }, - { - "type": "report", - "name": "Balance Sheet", - "doctype": "GL Entry", - "is_query_report": True - }, - { - "type": "report", - "name": "Cash Flow", - "doctype": "GL Entry", - "is_query_report": True - }, - { - "type": "report", - "name": "Profit and Loss Statement", - "doctype": "GL Entry", - "is_query_report": True - }, - { - "type": "report", - "name": "Consolidated Financial Statement", - "doctype": "GL Entry", - "is_query_report": True + "type": "doctype", + "name": "Payment Term", + "description": _("Payment Terms based on conditions") }, ] }, @@ -243,43 +177,10 @@ def get_data(): "items": [ { "type": "doctype", - "label": _("Bank"), - "name": "Bank", + "label": _("Match Payments with Invoices"), + "name": "Payment Reconciliation", + "description": _("Match non-linked Invoices and Payments.") }, - { - "type": "page", - "label": _("Reconcile payments and bank transactions"), - "name": "bank-reconciliation", - "description": _("Link bank transactions with payments.") - }, - { - "type": "doctype", - "label": _("Bank Account"), - "name": "Bank Account", - }, - { - "type": "doctype", - "label": _("Invoice Discounting"), - "name": "Invoice Discounting", - }, - { - "type": "doctype", - "label": _("Bank Statement Transaction Entry List"), - "name": "Bank Statement Transaction Entry", - "route": "#List/Bank Statement Transaction Entry", - }, - { - "type": "doctype", - "label": _("Bank Statement Transaction Entry Report"), - "name": "Bank Statement Transaction Entry", - "route": "#Report/Bank Statement Transaction Entry", - }, - { - "type": "doctype", - "label": _("Bank Statement Settings"), - "name": "Bank Statement Settings", - }, - { "type": "doctype", "label": _("Update Bank Transaction Dates"), @@ -288,9 +189,8 @@ def get_data(): }, { "type": "doctype", - "label": _("Match Payments with Invoices"), - "name": "Payment Reconciliation", - "description": _("Match non-linked Invoices and Payments.") + "label": _("Invoice Discounting"), + "name": "Invoice Discounting", }, { "type": "report", @@ -306,8 +206,75 @@ def get_data(): }, { "type": "doctype", - "name": "Bank Guarantee", - "doctype": "Bank Guarantee" + "name": "Bank Guarantee" + }, + { + "type": "doctype", + "name": "Cheque Print Template", + "description": _("Setup cheque dimensions for printing") + }, + ] + }, + { + "label": _("General Ledger"), + "items": [ + { + "type": "doctype", + "name": "Journal Entry", + "description": _("Accounting journal entries.") + }, + { + "type": "report", + "name": "General Ledger", + "doctype": "GL Entry", + "is_query_report": True, + }, + { + "type": "report", + "name": "Customer Ledger Summary", + "doctype": "Sales Invoice", + "is_query_report": True, + }, + { + "type": "report", + "name": "Supplier Ledger Summary", + "doctype": "Sales Invoice", + "is_query_report": True, + } + ] + }, + { + "label": _("Taxes"), + "items": [ + { + "type": "doctype", + "name": "Sales Taxes and Charges Template", + "description": _("Tax template for selling transactions.") + }, + { + "type": "doctype", + "name": "Purchase Taxes and Charges Template", + "description": _("Tax template for buying transactions.") + }, + { + "type": "doctype", + "name": "Item Tax Template", + "description": _("Tax template for item tax rates.") + }, + { + "type": "doctype", + "name": "Tax Category", + "description": _("Tax Category for overriding tax rates.") + }, + { + "type": "doctype", + "name": "Tax Rule", + "description": _("Tax Rule for transactions.") + }, + { + "type": "doctype", + "name": "Tax Withholding Category", + "description": _("Tax Withholding rates to be applied on transactions.") }, ] }, @@ -327,6 +294,10 @@ def get_data(): "name": "Budget", "description": _("Define budget for a financial year.") }, + { + "type": "doctype", + "name": "Accounting Dimension", + }, { "type": "report", "name": "Budget Variance Report", @@ -338,51 +309,106 @@ def get_data(): "name": "Monthly Distribution", "description": _("Seasonality for setting budgets, targets etc.") }, + ] + }, + { + "label": _("Financial Statements"), + "items": [ + { + "type": "report", + "name": "Trial Balance", + "doctype": "GL Entry", + "is_query_report": True, + }, + { + "type": "report", + "name": "Profit and Loss Statement", + "doctype": "GL Entry", + "is_query_report": True + }, + { + "type": "report", + "name": "Balance Sheet", + "doctype": "GL Entry", + "is_query_report": True + }, + { + "type": "report", + "name": "Cash Flow", + "doctype": "GL Entry", + "is_query_report": True + }, + { + "type": "report", + "name": "Consolidated Financial Statement", + "doctype": "GL Entry", + "is_query_report": True + }, + ] + }, + { + "label": _("Opening and Closing"), + "items": [ + { + "type": "doctype", + "name": "Opening Invoice Creation Tool", + }, + { + "type": "doctype", + "name": "Chart of Accounts Importer", + }, { "type": "doctype", "name": "Period Closing Voucher", "description": _("Close Balance Sheet and book Profit or Loss.") }, ] + }, { - "label": _("Taxes"), + "label": _("Multi Currency"), "items": [ { "type": "doctype", - "name": "Tax Category", - "description": _("Tax Category for overriding tax rates.") + "name": "Currency", + "description": _("Enable / disable currencies.") }, { "type": "doctype", - "name": "Sales Taxes and Charges Template", - "description": _("Tax template for selling transactions.") + "name": "Currency Exchange", + "description": _("Currency exchange rate master.") }, { "type": "doctype", - "name": "Purchase Taxes and Charges Template", - "description": _("Tax template for buying transactions.") + "name": "Exchange Rate Revaluation", + "description": _("Exchange Rate Revaluation master.") + }, + ] + }, + { + "label": _("Settings"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "Payment Gateway Account", + "description": _("Setup Gateway accounts.") }, { "type": "doctype", - "name": "Item Tax Template", - "description": _("Tax template for item tax rates.") + "name": "Terms and Conditions", + "label": _("Terms and Conditions Template"), + "description": _("Template of terms or contract.") }, { "type": "doctype", - "name": "Tax Rule", - "description": _("Tax Rule for transactions.") - }, - { - "type": "doctype", - "name": "Tax Withholding Category", - "description": _("Tax Withholding rates to be applied on transactions.") + "name": "Mode of Payment", + "description": _("e.g. Bank, Cash, Credit Card") }, ] }, { "label": _("Subscription Management"), - "icon": "fa fa-microchip ", "items": [ { "type": "doctype", @@ -403,7 +429,31 @@ def get_data(): ] }, { - "label": _("Key Reports"), + "label": _("Bank Statement"), + "items": [ + { + "type": "doctype", + "label": _("Bank"), + "name": "Bank", + }, + { + "type": "doctype", + "label": _("Bank Account"), + "name": "Bank Account", + }, + { + "type": "doctype", + "name": "Bank Statement Transaction Entry", + }, + { + "type": "doctype", + "label": _("Bank Statement Settings"), + "name": "Bank Statement Settings", + }, + ] + }, + { + "label": _("Profitability"), "items": [ { "type": "report", @@ -413,21 +463,9 @@ def get_data(): }, { "type": "report", - "name": "Sales Register", - "doctype": "Sales Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Purchase Register", - "doctype": "Purchase Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Purchase Invoice Trends", + "name": "Profitability Analysis", + "doctype": "GL Entry", "is_query_report": True, - "doctype": "Purchase Invoice" }, { "type": "report", @@ -437,38 +475,14 @@ def get_data(): }, { "type": "report", - "name": "Item-wise Sales Register", - "is_query_report": True, - "doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Item-wise Purchase Register", + "name": "Purchase Invoice Trends", "is_query_report": True, "doctype": "Purchase Invoice" }, - { - "type": "report", - "name": "Profitability Analysis", - "doctype": "GL Entry", - "is_query_report": True, - }, - { - "type": "report", - "name": "Customer Ledger Summary", - "doctype": "Sales Invoice", - "is_query_report": True, - }, - { - "type": "report", - "name": "Supplier Ledger Summary", - "doctype": "Sales Invoice", - "is_query_report": True, - } ] }, { - "label": _("Other Reports"), + "label": _("Reports"), "icon": "fa fa-table", "items": [ { @@ -489,18 +503,6 @@ def get_data(): "is_query_report": True, "doctype": "Sales Invoice" }, - { - "type": "report", - "name": "Accounts Receivable Summary", - "doctype": "Sales Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Accounts Payable Summary", - "doctype": "Purchase Invoice", - "is_query_report": True - }, { "type": "report", "is_query_report": True, @@ -549,27 +551,7 @@ def get_data(): } ] }, - { - "label": _("Help"), - "icon": "fa fa-facetime-video", - "items": [ - { - "type": "help", - "label": _("Chart of Accounts"), - "youtube_id": "DyR-DST-PyA" - }, - { - "type": "help", - "label": _("Opening Accounting Balance"), - "youtube_id": "kdgM20Q-q68" - }, - { - "type": "help", - "label": _("Setting up Taxes"), - "youtube_id": "nQ1zZdPgdaQ" - } - ] - } + ] gst = { @@ -617,6 +599,12 @@ def get_data(): "name": "GST Itemised Purchase Register", "is_query_report": True }, + { + "type": "doctype", + "name": "C-Form", + "description": _("C-Form records"), + "country": "India" + }, ] } @@ -624,6 +612,6 @@ def get_data(): countries = frappe.get_all("Company", fields="country") countries = [country["country"] for country in countries] if "India" in countries: - config.insert(7, gst) + config.insert(9, gst) domains = frappe.get_active_domains() return config diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py index ba3492330e..e0f4be9233 100644 --- a/erpnext/config/buying.py +++ b/erpnext/config/buying.py @@ -228,29 +228,5 @@ def get_data(): } ] }, - { - "label": _("Help"), - "items": [ - { - "type": "help", - "label": _("Customer and Supplier"), - "youtube_id": "anoGi_RpQ20" - }, - { - "type": "help", - "label": _("Material Request to Purchase Order"), - "youtube_id": "4TN9kPyfIqM" - }, - { - "type": "help", - "label": _("Purchase Order to Payment"), - "youtube_id": "EK65tLdVUDk" - }, - { - "type": "help", - "label": _("Managing Subcontracting"), - "youtube_id": "ThiMCC2DtKo" - }, - ] - }, + ] diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index 21e6a505a8..261edaf942 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -4,127 +4,13 @@ from frappe import _ def get_data(): return [ { - "label": _("Employee and Attendance"), + "label": _("Employee"), "items": [ { "type": "doctype", "name": "Employee", "onboard": 1, }, - { - "type": "doctype", - "name": "Employee Attendance Tool", - "hide_count": True, - "onboard": 1, - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Group", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Attendance", - "onboard": 1, - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Attendance Request", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Upload Attendance", - "hide_count": True, - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Checkin", - "hide_count": True, - "onboard": 1, - "dependencies": ["Employee"] - }, - ] - }, - { - "label": _("Payroll"), - "items": [ - { - "type": "doctype", - "name": "Salary Structure", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Salary Structure Assignment", - "onboard": 1, - "dependencies": ["Salary Structure", "Employee"], - }, - { - "type": "doctype", - "name": "Salary Slip", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Payroll Entry", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Employee Benefit Application", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Benefit Claim", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Additional Salary", - }, - { - "type": "doctype", - "name": "Employee Tax Exemption Declaration", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Tax Exemption Proof Submission", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Incentive", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Retention Bonus", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Payroll Period", - }, - { - "type": "doctype", - "name": "Salary Component", - }, - ] - }, - { - "label": _("Settings"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "HR Settings", - }, { "type": "doctype", "name": "Employment Type", @@ -147,19 +33,56 @@ def get_data(): }, { "type": "doctype", - "name": "Daily Work Summary Group" + "name": "Employee Group", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Employee Health Insurance" }, - { - "type": "doctype", - "name": "Staffing Plan", - } ] }, - + { + "label": _("Attendance"), + "items": [ + { + "type": "doctype", + "name": "Employee Attendance Tool", + "hide_count": True, + "onboard": 1, + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Attendance", + "onboard": 1, + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Attendance Request", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Upload Attendance", + "hide_count": True, + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Checkin", + "hide_count": True, + "dependencies": ["Employee"] + }, + { + "type": "report", + "is_query_report": True, + "name": "Monthly Attendance Sheet", + "doctype": "Attendance" + }, + ] + }, { "label": _("Leaves"), "items": [ @@ -175,13 +98,8 @@ def get_data(): }, { "type": "doctype", - "name": "Compensatory Leave Request", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Leave Encashment", - "dependencies": ["Employee"] + "name": "Leave Policy", + "dependencies": ["Leave Type"] }, { "type": "doctype", @@ -194,37 +112,167 @@ def get_data(): }, { "type": "doctype", - "name": "Leave Policy", - "dependencies": ["Leave Type"] + "name": "Holiday List", }, { "type": "doctype", - "name": "Holiday List", + "name": "Compensatory Leave Request", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Leave Encashment", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Leave Block List", }, + { + "type": "report", + "is_query_report": True, + "name": "Employee Leave Balance", + "doctype": "Leave Application" + }, ] }, { - "label": _("Recruitment and Training"), + "label": _("Payroll"), "items": [ { "type": "doctype", - "name": "Job Applicant", + "name": "Salary Structure", "onboard": 1, }, + { + "type": "doctype", + "name": "Salary Structure Assignment", + "onboard": 1, + "dependencies": ["Salary Structure", "Employee"], + }, + { + "type": "doctype", + "name": "Payroll Entry", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Salary Slip", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Salary Component", + }, + { + "type": "doctype", + "name": "Additional Salary", + }, + { + "type": "doctype", + "name": "Retention Bonus", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Incentive", + "dependencies": ["Employee"] + }, + { + "type": "report", + "is_query_report": True, + "name": "Salary Register", + "doctype": "Salary Slip" + }, + ] + }, + { + "label": _("Employee Tax and Benefits"), + "items": [ + { + "type": "doctype", + "name": "Employee Tax Exemption Declaration", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Tax Exemption Proof Submission", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Benefit Application", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Benefit Claim", + "dependencies": ["Employee"] + }, + ] + }, + { + "label": _("Employee Lifecycle"), + "items": [ + { + "type": "doctype", + "name": "Employee Onboarding", + "dependencies": ["Job Applicant"], + }, + { + "type": "doctype", + "name": "Employee Promotion", + "dependencies": ["Employee"], + }, + { + "type": "doctype", + "name": "Employee Transfer", + "dependencies": ["Employee"], + }, + { + "type": "doctype", + "name": "Employee Separation", + "dependencies": ["Employee"], + }, + { + "type": "doctype", + "name": "Employee Onboarding Template", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Separation Template", + "dependencies": ["Employee"] + }, + ] + }, + { + "label": _("Recruitment"), + "items": [ { "type": "doctype", "name": "Job Opening", "onboard": 1, }, + { + "type": "doctype", + "name": "Job Applicant", + "onboard": 1, + }, { "type": "doctype", "name": "Job Offer", "onboard": 1, }, + { + "type": "doctype", + "name": "Staffing Plan", + }, + ] + }, + { + "label": _("Training"), + "items": [ { "type": "doctype", "name": "Training Program" @@ -244,42 +292,7 @@ def get_data(): ] }, { - "label": _("Employee Lifecycle"), - "items": [ - { - "type": "doctype", - "name": "Employee Transfer", - "dependencies": ["Employee"], - }, - { - "type": "doctype", - "name": "Employee Promotion", - "dependencies": ["Employee"], - }, - { - "type": "doctype", - "name": "Employee Separation", - "dependencies": ["Employee"], - }, - { - "type": "doctype", - "name": "Employee Onboarding", - "dependencies": ["Job Applicant"], - }, - { - "type": "doctype", - "name": "Employee Separation Template", - "dependencies": ["Employee"] - }, - { - "type": "doctype", - "name": "Employee Onboarding Template", - "dependencies": ["Employee"] - } - ] - }, - { - "label": _("Appraisals, Expense Claims and Loans"), + "label": _("Performance"), "items": [ { "type": "doctype", @@ -290,15 +303,24 @@ def get_data(): "name": "Appraisal Template", }, { - "type": "page", - "name": "team-updates", - "label": _("Team Updates") + "type": "doctype", + "name": "Energy Point Rule", }, { "type": "doctype", - "name": "Employee Advance", - "dependencies": ["Employee"] + "name": "Energy Point Log", }, + { + "type": "link", + "doctype": "Energy Point Log", + "label": _("Energy Point Leaderboard"), + "route": "#social/users" + }, + ] + }, + { + "label": _("Expense Claims"), + "items": [ { "type": "doctype", "name": "Expense Claim", @@ -306,8 +328,14 @@ def get_data(): }, { "type": "doctype", - "name": "Loan Type", + "name": "Employee Advance", + "dependencies": ["Employee"] }, + ] + }, + { + "label": _("Loans"), + "items": [ { "type": "doctype", "name": "Loan Application", @@ -316,19 +344,72 @@ def get_data(): { "type": "doctype", "name": "Loan" - } + }, + { + "type": "doctype", + "name": "Loan Type", + }, + ] + }, + { + "label": _("Shift Management"), + "items": [ + { + "type": "doctype", + "name": "Shift Type", + }, + { + "type": "doctype", + "name": "Shift Request", + }, + { + "type": "doctype", + "name": "Shift Assignment", + }, + ] + }, + { + "label": _("Fleet Management"), + "items": [ + { + "type": "doctype", + "name": "Vehicle" + }, + { + "type": "doctype", + "name": "Vehicle Log" + }, + { + "type": "report", + "is_query_report": True, + "name": "Vehicle Expenses", + "doctype": "Vehicle" + }, + ] + }, + { + "label": _("Settings"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "HR Settings", + }, + { + "type": "doctype", + "name": "Daily Work Summary Group" + }, + { + "type": "page", + "name": "team-updates", + "label": _("Team Updates") + }, ] }, { "label": _("Reports"), "icon": "fa fa-list", "items": [ - { - "type": "report", - "is_query_report": True, - "name": "Employee Leave Balance", - "doctype": "Leave Application" - }, { "type": "report", "is_query_report": True, @@ -341,29 +422,6 @@ def get_data(): "name": "Employees working on a holiday", "doctype": "Employee" }, - { - "type": "report", - "name": "Employee Information", - "doctype": "Employee" - }, - { - "type": "report", - "is_query_report": True, - "name": "Salary Register", - "doctype": "Salary Slip" - }, - { - "type": "report", - "is_query_report": True, - "name": "Monthly Attendance Sheet", - "doctype": "Attendance" - }, - { - "type": "report", - "is_query_report": True, - "name": "Vehicle Expenses", - "doctype": "Vehicle" - }, { "type": "report", "is_query_report": True, @@ -372,50 +430,4 @@ def get_data(): }, ] }, - { - "label": _("Shifts and Fleet Management"), - "items": [ - { - "type": "doctype", - "name": "Shift Type", - }, - { - "type": "doctype", - "name": "Shift Request", - }, - { - "type": "doctype", - "name": "Shift Assignment", - }, - { - "type": "doctype", - "name": "Vehicle" - }, - { - "type": "doctype", - "name": "Vehicle Log" - }, - ] - }, - # { - # "label": _("Help"), - # "icon": "fa fa-facetime-video", - # "items": [ - # { - # "type": "help", - # "label": _("Setting up Employees"), - # "youtube_id": "USfIUdZlUhw" - # }, - # { - # "type": "help", - # "label": _("Leave Management"), - # "youtube_id": "fc0p_AXebc8" - # }, - # { - # "type": "help", - # "label": _("Expense Claims"), - # "youtube_id": "5SZHJF--ZFY" - # } - # ] - # }, ] diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index 5a907fff48..40960e6778 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -90,15 +90,5 @@ def get_data(): }, ] }, - { - "label": _("Help"), - "icon": "fa fa-facetime-video", - "items": [ - { - "type": "help", - "label": _("Managing Projects"), - "youtube_id": "egxIGwtoKI4" - }, - ] - }, + ] diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index f18aadb9ef..844710d47c 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -318,41 +318,5 @@ def get_data(): } ] }, - { - "label": _("SMS"), - "icon": "fa fa-wrench", - "items": [ - { - "type": "doctype", - "name": "SMS Center", - "description":_("Send mass SMS to your contacts"), - }, - { - "type": "doctype", - "name": "SMS Log", - "description":_("Logs for maintaining sms delivery status"), - }, - - ] - }, - { - "label": _("Help"), - "items": [ - { - "type": "help", - "label": _("Customer and Supplier"), - "youtube_id": "anoGi_RpQ20" - }, - { - "type": "help", - "label": _("Sales Order to Payment"), - "youtube_id": "1eP90MWoDQM" - }, - { - "type": "help", - "label": _("Point-of-Sale"), - "youtube_id": "4WkelWkbP_c" - }, - ] - }, + ] diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py index f5e48b3b14..7d66df2360 100644 --- a/erpnext/config/stock.py +++ b/erpnext/config/stock.py @@ -329,45 +329,5 @@ def get_data(): } ] }, - { - "label": _("Help"), - "icon": "fa fa-facetime-video", - "items": [ - { - "type": "help", - "label": _("Items and Pricing"), - "youtube_id": "qXaEwld4_Ps" - }, - { - "type": "help", - "label": _("Item Variants"), - "youtube_id": "OGBETlCzU5o" - }, - { - "type": "help", - "label": _("Opening Stock Balance"), - "youtube_id": "0yPgrtfeCTs" - }, - { - "type": "help", - "label": _("Making Stock Entries"), - "youtube_id": "Njt107hlY3I" - }, - { - "type": "help", - "label": _("Serialized Inventory"), - "youtube_id": "gvOVlEwFDAk" - }, - { - "type": "help", - "label": _("Batch Inventory"), - "youtube_id": "J0QKl7ABPKM" - }, - { - "type": "help", - "label": _("Managing Subcontracting"), - "youtube_id": "ThiMCC2DtKo" - }, - ] - } + ] From 94a0d45b7792d766db95238e3ff303f6a26d89da Mon Sep 17 00:00:00 2001 From: Himanshu Date: Mon, 15 Jul 2019 08:36:50 +0000 Subject: [PATCH 07/11] fix: do not add an extra day (#18311) --- erpnext/support/doctype/issue/issue.py | 3 ++- erpnext/www/lms/macros/__init__.py | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 erpnext/www/lms/macros/__init__.py diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index ce9fb12145..98d8c99809 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -270,7 +270,8 @@ def get_expected_time_for(parameter, service_level, start_date_time): allotted_days -= 1 expected_time_is_set = allotted_days <= 0 - current_date_time = add_to_date(current_date_time, days=1) + if not expected_time_is_set: + current_date_time = add_to_date(current_date_time, days=1) if end_time and time_period != 'Hour': current_date_time = datetime.combine(getdate(current_date_time), get_time(end_time)) diff --git a/erpnext/www/lms/macros/__init__.py b/erpnext/www/lms/macros/__init__.py new file mode 100644 index 0000000000..e69de29bb2 From 1ac9a8e82ed92e72455f4f6c761faeb4c121f210 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Mon, 15 Jul 2019 14:08:47 +0530 Subject: [PATCH 08/11] fix(bin): update requested qty in bin (#18297) --- erpnext/patches.txt | 3 ++- ...t_requested_qty_for_non_stock_uom_items.py | 21 +++++++++++++++++++ erpnext/stock/stock_balance.py | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v10_0/repost_requested_qty_for_non_stock_uom_items.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a29378547e..f5666dfc60 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -505,6 +505,7 @@ erpnext.patches.v10_0.update_hub_connector_domain erpnext.patches.v10_0.set_student_party_type erpnext.patches.v10_0.update_project_in_sle erpnext.patches.v10_0.fix_reserved_qty_for_sub_contract +erpnext.patches.v10_0.repost_requested_qty_for_non_stock_uom_items erpnext.patches.v11_0.merge_land_unit_with_location erpnext.patches.v11_0.add_index_on_nestedset_doctypes erpnext.patches.v11_0.remove_modules_setup_page @@ -619,4 +620,4 @@ erpnext.patches.v12_0.delete_priority_property_setter execute:frappe.delete_doc("DocType", "Project Task") erpnext.patches.v11_1.update_default_supplier_in_item_defaults erpnext.patches.v12_0.update_due_date_in_gle -erpnext.patches.v12_0.add_default_buying_selling_terms_in_company +erpnext.patches.v12_0.add_default_buying_selling_terms_in_company \ No newline at end of file diff --git a/erpnext/patches/v10_0/repost_requested_qty_for_non_stock_uom_items.py b/erpnext/patches/v10_0/repost_requested_qty_for_non_stock_uom_items.py new file mode 100644 index 0000000000..4fe4e97cf5 --- /dev/null +++ b/erpnext/patches/v10_0/repost_requested_qty_for_non_stock_uom_items.py @@ -0,0 +1,21 @@ +# Copyright (c) 2019, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty + + count=0 + for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse + from `tabMaterial Request Item` where docstatus = 1 and stock_uom<>uom"""): + try: + count += 1 + update_bin_qty(item_code, warehouse, { + "indented_qty": get_indented_qty(item_code, warehouse), + }) + if count % 200 == 0: + frappe.db.commit() + except: + frappe.db.rollback() diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py index 4d07a0e857..d68f97917f 100644 --- a/erpnext/stock/stock_balance.py +++ b/erpnext/stock/stock_balance.py @@ -110,7 +110,7 @@ def get_reserved_qty(item_code, warehouse): return flt(reserved_qty[0][0]) if reserved_qty else 0 def get_indented_qty(item_code, warehouse): - indented_qty = frappe.db.sql("""select sum(mr_item.qty - mr_item.ordered_qty) + indented_qty = frappe.db.sql("""select sum((mr_item.qty - mr_item.ordered_qty) * mr_item.conversion_factor) from `tabMaterial Request Item` mr_item, `tabMaterial Request` mr where mr_item.item_code=%s and mr_item.warehouse=%s and mr_item.qty > mr_item.ordered_qty and mr_item.parent=mr.name From e37ff3983675524210160c9db403e0346ad3a2d8 Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Mon, 15 Jul 2019 14:16:52 +0530 Subject: [PATCH 09/11] fix: Validate loan repayment amount in Loan Application (#18169) * fix: validate loan repayment amount * fix: test for loan application --- .../loan_application/loan_application.py | 9 +++++--- .../loan_application/test_loan_application.py | 21 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/erpnext/hr/doctype/loan_application/loan_application.py b/erpnext/hr/doctype/loan_application/loan_application.py index 5dbcf15eac..67be9f2a1c 100644 --- a/erpnext/hr/doctype/loan_application/loan_application.py +++ b/erpnext/hr/doctype/loan_application/loan_application.py @@ -29,9 +29,12 @@ class LoanApplication(Document): if self.repayment_method == "Repay Fixed Amount per Period": monthly_interest_rate = flt(self.rate_of_interest) / (12 *100) if monthly_interest_rate: - self.repayment_periods = math.ceil((math.log(self.repayment_amount) - - math.log(self.repayment_amount - (self.loan_amount*monthly_interest_rate))) / - (math.log(1 + monthly_interest_rate))) + min_repayment_amount = self.loan_amount*monthly_interest_rate + if self.repayment_amount - min_repayment_amount < 0: + frappe.throw(_("Repayment Amount must be greater than " \ + + str(flt(min_repayment_amount, 2)))) + self.repayment_periods = math.ceil(math.log(self.repayment_amount) - + math.log(self.repayment_amount - min_repayment_amount) /(math.log(1 + monthly_interest_rate))) else: self.repayment_periods = self.loan_amount / self.repayment_amount diff --git a/erpnext/hr/doctype/loan_application/test_loan_application.py b/erpnext/hr/doctype/loan_application/test_loan_application.py index 7644dd0c9f..b08b522503 100644 --- a/erpnext/hr/doctype/loan_application/test_loan_application.py +++ b/erpnext/hr/doctype/loan_application/test_loan_application.py @@ -31,21 +31,22 @@ class TestLoanApplication(unittest.TestCase): "rate_of_interest": 9.2, "loan_amount": 250000, "repayment_method": "Repay Over Number of Periods", - "repayment_periods": 24 + "repayment_periods": 18 }) loan_application.insert() - + def test_loan_totals(self): loan_application = frappe.get_doc("Loan Application", {"applicant":self.applicant}) - self.assertEquals(loan_application.repayment_amount, 11445) - self.assertEquals(loan_application.total_payable_interest, 24657) - self.assertEquals(loan_application.total_payable_amount, 274657) - loan_application.repayment_method = "Repay Fixed Amount per Period" - loan_application.repayment_amount = 15000 + self.assertEqual(loan_application.total_payable_interest, 18599) + self.assertEqual(loan_application.total_payable_amount, 268599) + self.assertEqual(loan_application.repayment_amount, 14923) + + loan_application.repayment_periods = 24 loan_application.save() + loan_application.reload() - self.assertEqual(loan_application.repayment_periods, 18) - self.assertEqual(loan_application.total_payable_interest, 18506) - self.assertEqual(loan_application.total_payable_amount, 268506) \ No newline at end of file + self.assertEqual(loan_application.total_payable_interest, 24657) + self.assertEqual(loan_application.total_payable_amount, 274657) + self.assertEqual(loan_application.repayment_amount, 11445) From 280fe396b9891f19cc45a6ee8fe007e499b33649 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 15 Jul 2019 14:30:21 +0530 Subject: [PATCH 10/11] fix: Dont rebuild cache on cache bust (#18319) - Results in a lot of stale background jobs - Cache will be built when needed --- erpnext/stock/doctype/item/item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 6484b93485..03e903c06f 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -1007,7 +1007,7 @@ def invalidate_item_variants_cache_for_website(doc): if item_code: item_cache = ItemVariantsCacheManager(item_code) - item_cache.rebuild_cache() + item_cache.clear_cache() def check_stock_uom_with_bin(item, stock_uom): From 1abd1e79a9763b5187e5c4eb4f9df37e9e9f894a Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 15 Jul 2019 14:34:10 +0530 Subject: [PATCH 11/11] fix: Module Links (#18318) * fix: Add Project Billing Summary link * fix: Bank Guarantee shouldn't depend on Bank Guarantee --- erpnext/config/projects.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index 40960e6778..47700d10b2 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -88,6 +88,13 @@ def get_data(): "doctype": "Project", "dependencies": ["Project"], }, + { + "type": "report", + "is_query_report": True, + "name": "Project Billing Summary", + "doctype": "Project", + "dependencies": ["Project"], + }, ] },