commit
a5ac0149af
@ -6,6 +6,7 @@ import frappe
|
||||
from frappe.core.doctype.custom_field.custom_field import create_custom_field_if_values_exist
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("delete from tabDocField where parent='Salary Slip' and options='Grade'")
|
||||
docfields = {
|
||||
("Purchase Receipt", "challan_no"): frappe.get_meta("Purchase Receipt").get_field("challan_no"),
|
||||
("Purchase Receipt", "challan_date"): frappe.get_meta("Purchase Receipt").get_field("challan_date"),
|
||||
@ -18,6 +19,8 @@ def execute():
|
||||
}
|
||||
|
||||
for (doctype, fieldname), df in docfields.items():
|
||||
if not df:
|
||||
continue
|
||||
opts = df.as_dict()
|
||||
if df.idx >= 2:
|
||||
opts["insert_after"] = frappe.get_meta(doctype).get("fields")[df.idx - 2].fieldname
|
||||
|
@ -8,7 +8,7 @@ def execute():
|
||||
frappe.reload_doc("core", "doctype", "outgoing_email_settings")
|
||||
frappe.reload_doc("support", "doctype", "support_email_settings")
|
||||
|
||||
email_settings = frappe.get_doc("Email Settings")
|
||||
email_settings = get_email_settings()
|
||||
map_outgoing_email_settings(email_settings)
|
||||
map_support_email_settings(email_settings)
|
||||
frappe.delete_doc("Doctype", "Email Settings")
|
||||
@ -48,3 +48,9 @@ def map_support_email_settings(email_settings):
|
||||
|
||||
support_email_settings.save()
|
||||
|
||||
def get_email_settings():
|
||||
ret = {}
|
||||
for field, value in frappe.db.sql("select field, value from tabSingles where doctype='Email Settings'"):
|
||||
ret[field] = value
|
||||
return ret
|
||||
|
||||
|
@ -86,7 +86,9 @@ def add_employee_restrictions_to_leave_approver():
|
||||
where `tabEmployee Leave Approver`.parent=`tabEmployee`.name)
|
||||
or ifnull(`reports_to`, '')!=''"""):
|
||||
|
||||
frappe.get_doc("Employee", employee).save()
|
||||
emp = frappe.get_doc("Employee", employee)
|
||||
emp.ignore_links = True
|
||||
emp.save()
|
||||
|
||||
def update_permissions():
|
||||
# clear match conditions other than owner
|
||||
|
Loading…
Reference in New Issue
Block a user