Merge pull request #17255 from Anurag810/patch_for_salary_structure

fix: (Patch)make salary details submitable if  salary structure is submitted
This commit is contained in:
Nabin Hait
2019-04-22 11:17:28 +05:30
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -590,4 +590,5 @@ erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
erpnext.patches.v11_0.make_italian_localization_fields # 26-03-2019
erpnext.patches.v11_1.make_job_card_time_logs
erpnext.patches.v11_1.set_variant_based_on
erpnext.patches.v11_1.woocommerce_set_creation_user
erpnext.patches.v11_1.woocommerce_set_creation_user
erpnext.patches.v11_1.set_salary_details_submitable

View File

@@ -0,0 +1,11 @@
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""
update `tabSalary Structure` ss, `tabSalary Detail` sd
set sd.docstatus=1
where ss.name=sd.parent and ss.docstatus=1 and sd.parenttype='Salary Structure'
""")