patch fixes (#14936)

This commit is contained in:
Saurabh 2018-07-17 16:38:11 +05:30 committed by Nabin Hait
parent 1e693fe6c9
commit e78a877202
7 changed files with 23 additions and 16 deletions

View File

@ -4493,7 +4493,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2018-07-06 02:38:40.310899",
"modified": "2018-07-17 02:38:40.310899",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@ -3737,7 +3737,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-07-06 11:00:05.037716",
"modified": "2018-07-17 11:00:05.037716",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@ -2779,7 +2779,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2018-07-06 02:45:48.616334",
"modified": "2018-07-17 02:45:48.616334",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",

View File

@ -3,13 +3,20 @@ import frappe
# Set department value based on employee value
def execute():
doctypes_to_update = ['Appraisal', 'Leave Allocation', 'Expense Claim', 'Instructor', 'Salary Slip',
'Attendance', 'Training Feedback', 'Training Result Employee',
'Leave Application', 'Employee Advance', 'Activity Cost', 'Training Event Employee',
'Timesheet', 'Sales Person', 'Payroll Employee Detail']
for doctype in doctypes_to_update:
doctypes_to_update = {
'hr': ['Appraisal', 'Leave Allocation', 'Expense Claim', 'Salary Slip',
'Attendance', 'Training Feedback', 'Training Result Employee','Leave Application',
'Employee Advance', 'Training Event Employee', 'Payroll Employee Detail'],
'education': ['Instructor'],
'projects': ['Activity Cost', 'Timesheet'],
'setup': ['Sales Person']
}
for module, doctypes in doctypes_to_update.items():
for doctype in doctypes:
if frappe.db.table_exists(doctype):
frappe.reload_doc(module, 'doctype', frappe.scrub(doctype))
frappe.db.sql("""
update `tab%s` dt
set department=(select department from `tabEmployee` where name=dt.employee)

View File

@ -3163,7 +3163,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
"modified": "2018-07-06 03:23:15.354674",
"modified": "2018-07-17 03:23:15.354674",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",

View File

@ -3881,7 +3881,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2018-07-06 03:03:35.035396",
"modified": "2018-07-17 03:03:35.035396",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@ -3436,7 +3436,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2018-07-06 02:59:59.609643",
"modified": "2018-07-17 02:59:59.609643",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",