Merge pull request #23777 from rohitwaghchaure/fixed-set-po-details-in-subcontract-stock-entry-develop
fix: po_detail field has no value for subcontracted stock entry
diff --git a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json
index 79fcb95..d422876 100644
--- a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json
+++ b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json
@@ -55,6 +55,7 @@
"fieldtype": "Date",
"in_list_view": 1,
"label": "Depreciation Posting Date",
+ "mandatory_depends_on": "eval:parent.doctype == 'Asset'",
"reqd": 1
},
{
@@ -86,7 +87,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2020-09-16 12:11:30.631788",
+ "modified": "2020-10-30 15:22:29.119868",
"modified_by": "Administrator",
"module": "Assets",
"name": "Asset Finance Book",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 8b34eaa..5ef5371 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -732,3 +732,4 @@
erpnext.patches.v13_0.print_uom_after_quantity_patch
erpnext.patches.v13_0.set_payment_channel_in_payment_gateway_account
erpnext.patches.v13_0.create_healthcare_custom_fields_in_stock_entry_detail
+erpnext.patches.v13_0.update_reason_for_resignation_in_employee
diff --git a/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py b/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py
new file mode 100644
index 0000000..792118f
--- /dev/null
+++ b/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py
@@ -0,0 +1,15 @@
+# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
+# MIT License. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ frappe.reload_doc("hr", "doctype", "employee")
+
+ if frappe.db.has_column("Employee", "reason_for_resignation"):
+ frappe.db.sql(""" UPDATE `tabEmployee`
+ SET reason_for_leaving = reason_for_resignation
+ WHERE status = 'Left' and reason_for_leaving is null and reason_for_resignation is not null
+ """)
+