added test salary component create
This commit is contained in:
parent
b8b111b74a
commit
24934219f1
|
|
@ -80,6 +80,8 @@ doc_events = {
|
||||||
# Asset categories are now created automatically via Company.on_update event
|
# Asset categories are now created automatically via Company.on_update event
|
||||||
# setup_wizard_complete = "jey_erp.setup.setup_wizard_handler.setup_wizard_complete_handler"
|
# setup_wizard_complete = "jey_erp.setup.setup_wizard_handler.setup_wizard_complete_handler"
|
||||||
|
|
||||||
|
setup_wizard_complete = "jey_erp.setup.setup_wizard_handler.create_test_salary_component"
|
||||||
|
|
||||||
after_migrate = "jey_erp.hooks.after_migrate_combined"
|
after_migrate = "jey_erp.hooks.after_migrate_combined"
|
||||||
|
|
||||||
def after_migrate_combined():
|
def after_migrate_combined():
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,20 @@
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def create_test_salary_component(args):
|
||||||
|
if frappe.db.exists("Salary Component", "TEST COMP"):
|
||||||
|
return
|
||||||
|
|
||||||
|
doc = frappe.get_doc({
|
||||||
|
"doctype": "Salary Component",
|
||||||
|
"salary_component": "TEST COMP",
|
||||||
|
"salary_component_abbr": "TC",
|
||||||
|
"type": "Earning",
|
||||||
|
})
|
||||||
|
doc.insert(ignore_permissions=True)
|
||||||
|
frappe.db.commit()
|
||||||
|
|
||||||
|
|
||||||
def setup_wizard_complete_handler(args):
|
def setup_wizard_complete_handler(args):
|
||||||
"""
|
"""
|
||||||
Вызывается после завершения ERPNext setup wizard.
|
Вызывается после завершения ERPNext setup wizard.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue