feat: First attempt to get the accounting dimensions into employee allocation
This commit is contained in:
parent
d62077be59
commit
ffc616e1cb
@ -12,6 +12,9 @@ app_email = "code@studioinfinity.org"
|
|||||||
app_license = "GNU General Public License (v3)"
|
app_license = "GNU General Public License (v3)"
|
||||||
|
|
||||||
fixtures = ['Custom Field']
|
fixtures = ['Custom Field']
|
||||||
|
accounting_dimension_doctypes = ['JW Employee Allocation']
|
||||||
|
|
||||||
|
after_install = "justworks_erpnext.install.after_install"
|
||||||
|
|
||||||
# Includes in <head>
|
# Includes in <head>
|
||||||
# ------------------
|
# ------------------
|
||||||
@ -61,7 +64,6 @@ fixtures = ['Custom Field']
|
|||||||
# ------------
|
# ------------
|
||||||
|
|
||||||
# before_install = "justworks_erpnext.install.before_install"
|
# before_install = "justworks_erpnext.install.before_install"
|
||||||
# after_install = "justworks_erpnext.install.after_install"
|
|
||||||
|
|
||||||
# Desk Notifications
|
# Desk Notifications
|
||||||
# ------------------
|
# ------------------
|
||||||
|
10
justworks_erpnext/install.py
Normal file
10
justworks_erpnext/install.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from erpnext.doctype.accounting_dimension.accounting_dimension import make_dimension_in_accounting_doctypes, get_accounting_dimensions
|
||||||
|
|
||||||
|
def after_install():
|
||||||
|
jw_doclist = frappe.get_hooks('accounting_dimension_doctypes',
|
||||||
|
app='justworks_erpnext')
|
||||||
|
acc_dims = get_accounting_dimensions(as_list=False)
|
||||||
|
for dim in acc_dims:
|
||||||
|
make_dimension_in_accounting_doctypes(dim, doclist=jw_doclist)
|
@ -28,7 +28,7 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "employee.employee_name",
|
"fetch_from": "employee.employee_name",
|
||||||
"fieldname": "employee_name",
|
"fieldname": "employee_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -90,7 +90,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-11-17 00:49:16.498573",
|
"modified": "2020-11-17 01:39:51.349422",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Justworks ERPNext Connector",
|
"module": "Justworks ERPNext Connector",
|
||||||
"name": "JW Employee Allocation",
|
"name": "JW Employee Allocation",
|
||||||
|
Loading…
Reference in New Issue
Block a user