From cf00ee49ec2b5a72d6319890899071724164ab71 Mon Sep 17 00:00:00 2001 From: Marica Date: Fri, 31 Jul 2020 15:14:50 +0530 Subject: [PATCH 1/3] fix: PO/SO view title (#22858) --- erpnext/buying/doctype/purchase_order/purchase_order.json | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.json | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 502dbba571..4201e0b635 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -1084,7 +1084,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2020-07-18 05:09:33.800633", + "modified": "2020-07-31 14:13:44.610190", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", @@ -1135,5 +1135,5 @@ "sort_field": "modified", "sort_order": "DESC", "timeline_field": "supplier", - "title_field": "title" + "title_field": "supplier" } \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 8fa56ac959..a68b7387b7 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1,7 +1,6 @@ { "actions": [], "allow_import": 1, - "allow_workflow": 1, "autoname": "naming_series:", "creation": "2013-06-18 12:39:59", "doctype": "DocType", @@ -1461,7 +1460,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2020-07-18 05:13:06.680696", + "modified": "2020-07-31 14:13:17.962015", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", @@ -1535,7 +1534,7 @@ "sort_field": "modified", "sort_order": "DESC", "timeline_field": "customer", - "title_field": "title", + "title_field": "customer", "track_changes": 1, "track_seen": 1 } \ No newline at end of file From 2a4c90302b7597927d39039aeb8376e498f84fbb Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Fri, 31 Jul 2020 17:59:30 +0530 Subject: [PATCH 2/3] fix: minor recritment analytics fixes (#22830) Co-authored-by: Rucha Mahabal --- .../recruitment_analytics.py | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py b/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py index 867209436c..e961114ac2 100644 --- a/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py +++ b/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py @@ -96,33 +96,35 @@ def get_data(filters): def get_parent_row(sp_jo_map, sp, jo_ja_map, ja_joff_map): data = [] - for jo in sp_jo_map[sp]: - row = { - "staffing_plan" : sp, - "job_opening" : jo["name"], - } - data.append(row) - child_row = get_child_row( jo["name"], jo_ja_map, ja_joff_map) - data += child_row + if sp in sp_jo_map.keys(): + for jo in sp_jo_map[sp]: + row = { + "staffing_plan" : sp, + "job_opening" : jo["name"], + } + data.append(row) + child_row = get_child_row( jo["name"], jo_ja_map, ja_joff_map) + data += child_row return data def get_child_row(jo, jo_ja_map, ja_joff_map): data = [] - for ja in jo_ja_map[jo]: - row = { - "indent":1, - "job_applicant": ja.name, - "applicant_name": ja.applicant_name, - "application_status": ja.status, - } - if ja.name in ja_joff_map.keys(): - jo_detail =ja_joff_map[ja.name][0] - row["job_offer"] = jo_detail.name - row["job_offer_status"] = jo_detail.status - row["offer_date"]= jo_detail.offer_date.strftime("%d-%m-%Y") - row["designation"] = jo_detail.designation + if jo in jo_ja_map.keys(): + for ja in jo_ja_map[jo]: + row = { + "indent":1, + "job_applicant": ja.name, + "applicant_name": ja.applicant_name, + "application_status": ja.status, + } + if ja.name in ja_joff_map.keys(): + jo_detail =ja_joff_map[ja.name][0] + row["job_offer"] = jo_detail.name + row["job_offer_status"] = jo_detail.status + row["offer_date"]= jo_detail.offer_date.strftime("%d-%m-%Y") + row["designation"] = jo_detail.designation - data.append(row) + data.append(row) return data def get_staffing_plan(filters): @@ -177,7 +179,7 @@ def get_job_applicant(jo_list): def get_job_offer(ja_list): ja_joff_map = {} - offers = frappe.get_all("Job offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation']) + offers = frappe.get_all("Job Offer", filters = [["job_applicant", "IN", ja_list]], fields =["name", "job_applicant", "status", 'offer_date', 'designation']) for offer in offers: if offer.job_applicant not in ja_joff_map.keys(): From dcb462f3058266fbf9b73955ff964787b4cca7e4 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 1 Aug 2020 13:47:09 +0530 Subject: [PATCH 3/3] fix: Import pycountry and taxjar only if taxjar is enabled --- erpnext/erpnext_integrations/taxjar_integration.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/erpnext_integrations/taxjar_integration.py b/erpnext/erpnext_integrations/taxjar_integration.py index 633692dd24..24fc3d44b9 100644 --- a/erpnext/erpnext_integrations/taxjar_integration.py +++ b/erpnext/erpnext_integrations/taxjar_integration.py @@ -1,8 +1,5 @@ import traceback -import pycountry -import taxjar - import frappe from erpnext import get_default_company from frappe import _ @@ -32,6 +29,7 @@ def get_client(): def create_transaction(doc, method): + import taxjar """Create an order transaction in TaxJar""" if not TAXJAR_CREATE_TRANSACTIONS: @@ -208,6 +206,7 @@ def get_shipping_address_details(doc): def get_iso_3166_2_state_code(address): + import pycountry country_code = frappe.db.get_value("Country", address.get("country"), "code") error_message = _("""{0} is not a valid state! Check for typos or enter the ISO code for your state.""").format(address.get("state"))