From 06c7a7e6601914c36092c4cb1230f39701340ef2 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 23 Jul 2019 13:40:40 +0530 Subject: [PATCH 1/8] =?UTF-8?q?fix(website):=20Remove=20references=20to=20?= =?UTF-8?q?Product=20Settings.products=5Fa=E2=80=A6=20(#18451)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was accidentally added back in https://github.com/frappe/erpnext/commit/34c551d9a54573e5184bb16831e0baa4e7429dc2#diff-f0a387cdb305471e74e523ecc4e646ac --- erpnext/setup/doctype/item_group/item_group.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 8fbeac81382..cab21162c76 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -69,8 +69,7 @@ class ItemGroup(NestedSet, WebsiteGenerator): "items": get_product_list_for_group(product_group = self.name, start=start, limit=context.page_length + 1, search=frappe.form_dict.get("search")), "parents": get_parent_item_groups(self.parent_item_group), - "title": self.name, - "products_as_list": cint(frappe.db.get_single_value('Products Settings', 'products_as_list')) + "title": self.name }) if self.slideshow: From 4865eabee5152d43f4b827d1ec03a2cf050b4705 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Wed, 24 Jul 2019 13:37:54 +0530 Subject: [PATCH 2/8] fix: add Company by default in session defaults (#18460) --- erpnext/setup/install.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 03da833dec1..5e85f7d5265 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -22,6 +22,7 @@ def after_install(): add_all_roles_to("Administrator") create_default_cash_flow_mapper_templates() create_default_success_action() + add_company_to_session_defaults() frappe.db.commit() @@ -84,3 +85,10 @@ def create_default_success_action(): if not frappe.db.exists('Success Action', success_action.get("ref_doctype")): doc = frappe.get_doc(success_action) doc.insert(ignore_permissions=True) + +def add_company_to_session_defaults(): + settings = frappe.get_single("Session Default Settings") + settings.append("session_defaults", { + "ref_doctype": "Company" + }) + settings.save() From cb19ee457c8a1644642ad81b34ef6e7390687115 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 24 Jul 2019 16:05:59 +0530 Subject: [PATCH 3/8] fix: urls for changelog --- erpnext/change_log/v12/v12_0_0.md | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/erpnext/change_log/v12/v12_0_0.md b/erpnext/change_log/v12/v12_0_0.md index dcbc9a00dd1..198e3d77d65 100644 --- a/erpnext/change_log/v12/v12_0_0.md +++ b/erpnext/change_log/v12/v12_0_0.md @@ -1,41 +1,41 @@ # Version 12 Release Notes ### Accounting -1. [Accounting Dimensions](/docs/user/manual/en/accounts/accounting-dimensions) -1. [Chart of Accounts Importer](/docs/user/manual/en/setting-up/chart-of-accounts-importer) -1. [Invoice Discounting](/docs/user/manual/en/accounts/invoice_discounting) +1. [Accounting Dimensions](https://erpnext.com/docs/user/manual/en/accounts/accounting-dimensions) +1. [Chart of Accounts Importer](https://erpnext.com/docs/user/manual/en/setting-up/chart-of-accounts-importer) +1. [Invoice Discounting](https://erpnext.com/docs/user/manual/en/accounts/invoice_discounting) 1. [Tally Migrator](https://github.com/frappe/erpnext/pull/17405) ### Stock -1. [Serialized & Batched Item Reconciliation](/docs/user/manual/en/setting-up/stock-reconciliation#12-for-serialized-items) +1. [Serialized & Batched Item Reconciliation](https://erpnext.com/docs/user/manual/en/setting-up/stock-reconciliation#12-for-serialized-items) 1. [Auto Fetch Serialized Items](/version-12/release-notes/features#new-upload-dialog) -1. [Item Tax Templates](/docs/user/manual/en/accounts/item-tax-template) +1. [Item Tax Templates](https://erpnext.com/docs/user/manual/en/accounts/item-tax-template) ### HR -1. [Auto Attendance](/docs/user/manual/en/human-resources/auto-attendance) -1. [Employee Skill Map](/docs/user/manual/en/human-resources/employee_skill_map) -1. [Encrypted Salary Slips](/docs/user/manual/en/human-resources/hr-settings#24-encrypt-salary-slips-in-emails) -1. [Leave Ledger](/docs/user/manual/en/human-resources/leave-ledger-entry) -1. [Staffing Plan](/docs/user/manual/en/human-resources/staffing-plan) +1. [Auto Attendance](https://erpnext.com/docs/user/manual/en/human-resources/auto-attendance) +1. [Employee Skill Map](https://erpnext.com/docs/user/manual/en/human-resources/employee_skill_map) +1. [Encrypted Salary Slips](https://erpnext.com/docs/user/manual/en/human-resources/hr-settings#24-encrypt-salary-slips-in-emails) +1. [Leave Ledger](https://erpnext.com/docs/user/manual/en/human-resources/leave-ledger-entry) +1. [Staffing Plan](https://erpnext.com/docs/user/manual/en/human-resources/staffing-plan) ### CRM -1. [Promotional Scheme](/docs/user/manual/en/accounts/promotional-schemes) -1. [SLA](/docs/user/manual/en/support/service-level-agreement) -1. [Exotel Call Integration](/docs/user/manual/en/erpnext_integration/exotel_integration) -1. [Email Campaign](/docs/user/manual/en/CRM/email-campaign) +1. [Promotional Scheme](https://erpnext.com/docs/user/manual/en/accounts/promotional-schemes) +1. [SLA](https://erpnext.com/docs/user/manual/en/support/service-level-agreement) +1. [Exotel Call Integration](https://erpnext.com/docs/user/manual/en/erpnext_integration/exotel_integration) +1. [Email Campaign](https://erpnext.com/docs/user/manual/en/CRM/email-campaign) ### Domain Specific Features -1. [Learning Management System](/docs/user/manual/en/education/setting-up-lms) -1. [Quality Management System](/docs/user/manual/en/quality-management) -1. [Production Planning Enhancements](/docs/user/manual/en/manufacturing/production-plan/planning-for-material-requests) -1. [Project Template](/docs/user/manual/en/projects/project-template) +1. [Learning Management System](https://erpnext.com/docs/user/manual/en/education/setting-up-lms) +1. [Quality Management System](https://erpnext.com/docs/user/manual/en/quality-management) +1. [Production Planning Enhancements](https://erpnext.com/docs/user/manual/en/manufacturing/production-plan/planning-for-material-requests) +1. [Project Template](https://erpnext.com/docs/user/manual/en/projects/project-template) ### New Reports -1. [Bank Remittance](/docs/user/manual/en/human-resources/human-resources-reports#bank-remittance-report) -1. [BOM Explorer](/docs/user/manual/en/stock/articles/bom_explorer) -1. [Billing Summary Report](/docs/user/manual/en/projects/reports/billing_summary_reports) +1. [Bank Remittance](https://erpnext.com/docs/user/manual/en/human-resources/human-resources-reports#bank-remittance-report) +1. [BOM Explorer](https://erpnext.com/docs/user/manual/en/stock/articles/bom_explorer) +1. [Billing Summary Report](https://erpnext.com/docs/user/manual/en/projects/reports/billing_summary_reports) 1. [Procurement Tracker Report](docs/user/manual/en/buying/articles/procurement-tracker-report) -1. [Loan Repayment](/docs/user/manual/en/human-resources/human-resources-reports#loan-repayment-report) -1. [GSTR-3B](/docs/user/manual/en/regional/india/gst-3b-report) -1. [Sales Partner](/docs/user/manual/en/selling/sales-partner#sales-partner-reports) -1. [Sales Partner Target Variance based on Item Group](sales-partner-target-variance-based-on-item-group) +1. [Loan Repayment](https://erpnext.com/docs/user/manual/en/human-resources/human-resources-reports#loan-repayment-report) +1. [GSTR-3B](https://erpnext.com/docs/user/manual/en/regional/india/gst-3b-report) +1. [Sales Partner](https://erpnext.com/docs/user/manual/en/selling/sales-partner#sales-partner-reports) +1. [Sales Partner Target Variance based on Item Group](https://erpnext.com/docs/user/manual/en/selling/sales-partner#sales-partner-target-variance-based-on-item-group) From 8b08684e07a571182108d7c332118a1bfc330bf4 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 24 Jul 2019 16:10:34 +0530 Subject: [PATCH 4/8] fix: more url fixes --- erpnext/change_log/v12/v12_0_0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/change_log/v12/v12_0_0.md b/erpnext/change_log/v12/v12_0_0.md index 198e3d77d65..c2f33a8b7a8 100644 --- a/erpnext/change_log/v12/v12_0_0.md +++ b/erpnext/change_log/v12/v12_0_0.md @@ -8,7 +8,7 @@ ### Stock 1. [Serialized & Batched Item Reconciliation](https://erpnext.com/docs/user/manual/en/setting-up/stock-reconciliation#12-for-serialized-items) -1. [Auto Fetch Serialized Items](/version-12/release-notes/features#new-upload-dialog) +1. [Auto Fetch Serialized Items](https://erpnext.com/version-12/release-notes/features#new-upload-dialog) 1. [Item Tax Templates](https://erpnext.com/docs/user/manual/en/accounts/item-tax-template) ### HR From 89339bb80c3ff90b6bf273f1a55a183071c9e4f1 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Wed, 24 Jul 2019 21:32:55 +0530 Subject: [PATCH 5/8] fix: GSTR-1 query fix --- erpnext/regional/report/gstr_1/gstr_1.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index e8c170e7215..2da10857324 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -161,8 +161,9 @@ class Gstr1Report(object): "gst_category": ["in", ["Registered Regular", "Deemed Export", "SEZ"]] }) - conditions += """ and ifnull(gst_category, '') != 'Overseas' and is_return != 1 - and customer in ({0})""".format(", ".join([frappe.db.escape(c.name) for c in customers])) + if customers: + conditions += """ and ifnull(gst_category, '') != 'Overseas' and is_return != 1 + and customer in ({0})""".format(", ".join([frappe.db.escape(c.name) for c in customers])) if self.filters.get("type_of_business") in ("B2C Large", "B2C Small"): b2c_limit = frappe.db.get_single_value('GST Settings', 'b2c_limit') @@ -174,11 +175,11 @@ class Gstr1Report(object): "gst_category": ["in", ["Unregistered"]] }) - if self.filters.get("type_of_business") == "B2C Large": + if self.filters.get("type_of_business") == "B2C Large" and customers: conditions += """ and SUBSTR(place_of_supply, 1, 2) != SUBSTR(company_gstin, 1, 2) and grand_total > {0} and is_return != 1 and customer in ({1})""".\ format(flt(b2c_limit), ", ".join([frappe.db.escape(c.name) for c in customers])) - elif self.filters.get("type_of_business") == "B2C Small": + elif self.filters.get("type_of_business") == "B2C Small" and customers: conditions += """ and ( SUBSTR(place_of_supply, 1, 2) = SUBSTR(company_gstin, 1, 2) or grand_total <= {0}) and is_return != 1 and customer in ({1})""".\ From 53dc0c52cacf2a53a71cad845b16f28a7776ab91 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 25 Jul 2019 12:23:40 +0530 Subject: [PATCH 6/8] Dynamic link issue fix in Bank reconciliation statement --- .../bank_reconciliation_statement.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 1923f78cf89..63317c52d80 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -58,8 +58,7 @@ def get_columns(): { "fieldname": "payment_document", "label": _("Payment Document Type"), - "fieldtype": "Link", - "options": "DocType", + "fieldtype": "Data", "width": 220 }, { From 6998412990b4574e1b737a6e508491f632764a7a Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 26 Jul 2019 08:15:45 +0530 Subject: [PATCH 7/8] fix(Account): Pass parent currency to child currency In a scenario where Parent Company Account's Currency is different from it's default currency, the Account Currency of Child would be set from the default currency of Company which might be wrong --- erpnext/accounts/doctype/account/account.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 68efe377190..0e57b3f1986 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -123,7 +123,9 @@ class Account(NestedSet): doc.flags.ignore_root_company_validation = True doc.update({ "company": company, - "account_currency": None, + # parent account's currency should be passed down to child account's curreny + # if it is None, it picks it up from default company currency, which might be unintended + "account_currency": self.account_currency, "parent_account": parent_acc_name_map[company] }) doc.save() From ecd4d3883e77c5a620078b285c6a2726cdee53a2 Mon Sep 17 00:00:00 2001 From: Sahil Khan Date: Fri, 26 Jul 2019 13:29:14 +0550 Subject: [PATCH 8/8] bumped to version 12.0.1 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 020f843c1ae..a9348c11f49 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '12.0.0' +__version__ = '12.0.1' def get_default_company(user=None): '''Get default company for user'''