[fix] Duplicate salary components
This commit is contained in:
parent
7d977a243a
commit
fe86debf5d
@ -78,9 +78,12 @@ def execute():
|
|||||||
|
|
||||||
for doctype, cols in dt_cols_de.items():
|
for doctype, cols in dt_cols_de.items():
|
||||||
source_cols = "`" + "`, `".join(standard_cols_de + cols) + "`"
|
source_cols = "`" + "`, `".join(standard_cols_de + cols) + "`"
|
||||||
|
try:
|
||||||
frappe.db.sql("""INSERT INTO `tabSalary Component` ({0}) SELECT {1} FROM `tab{2}`"""
|
frappe.db.sql("""INSERT INTO `tabSalary Component` ({0}) SELECT {1} FROM `tab{2}`"""
|
||||||
.format(target_cols, source_cols, doctype))
|
.format(target_cols, source_cols, doctype))
|
||||||
|
except Exception, e:
|
||||||
|
if e.args[0]==1062:
|
||||||
|
pass
|
||||||
|
|
||||||
update_customizations()
|
update_customizations()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user