Merge pull request #22863 from deepeshgarg007/taxjar_fix
fix: Import pycountry and taxjar only if taxjar is enabled
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 824b2f2..51ac7cf 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -122,7 +122,7 @@
cost_center = frappe.form_dict.get("cost_center")
- cond = []
+ cond = ["is_cancelled=0"]
if date:
cond.append("posting_date <= %s" % frappe.db.escape(cstr(date)))
else:
@@ -206,7 +206,7 @@
return flt(bal)
def get_count_on(account, fieldname, date):
- cond = []
+ cond = ["is_cancelled=0"]
if date:
cond.append("posting_date <= %s" % frappe.db.escape(cstr(date)))
else:
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index 502dbba..4201e0b 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/hr/report/recruitment_analytics/recruitment_analytics.py b/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py
index 8672094..e961114 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_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_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():
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 8fa56ac..a68b738 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