diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 0d40b2188d9..4db56f396fa 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -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", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 9f39cbfe80c..c6fb2a19818 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -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", diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json index b7e1e332d6e..8f7bb2bcbc1 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json @@ -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", diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py index 274190833e6..b1098abb57a 100644 --- a/erpnext/patches/v11_0/set_department_for_doctypes.py +++ b/erpnext/patches/v11_0/set_department_for_doctypes.py @@ -3,14 +3,21 @@ 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: - if frappe.db.table_exists(doctype): - frappe.db.sql(""" - update `tab%s` dt - set department=(select department from `tabEmployee` where name=dt.employee) - """ % doctype) \ No newline at end of file + 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) + """ % doctype) diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index ccbb942d402..d3ca4f8f2f4 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -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", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index ffcda03ec03..5572baf645a 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -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", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 1f47317b2a9..51ccfcdb4f0 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -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",