feat: First attempt to get the accounting dimensions into employee allocation

This commit is contained in:
Glen Whitney 2020-11-17 22:25:35 +00:00
parent d62077be59
commit ffc616e1cb
3 changed files with 15 additions and 3 deletions

View File

@ -12,6 +12,9 @@ app_email = "code@studioinfinity.org"
app_license = "GNU General Public License (v3)"
fixtures = ['Custom Field']
accounting_dimension_doctypes = ['JW Employee Allocation']
after_install = "justworks_erpnext.install.after_install"
# Includes in <head>
# ------------------
@ -61,7 +64,6 @@ fixtures = ['Custom Field']
# ------------
# before_install = "justworks_erpnext.install.before_install"
# after_install = "justworks_erpnext.install.after_install"
# Desk Notifications
# ------------------

View 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)

View File

@ -28,7 +28,7 @@
"reqd": 1
},
{
"default": "employee.employee_name",
"fetch_from": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
@ -90,7 +90,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2020-11-17 00:49:16.498573",
"modified": "2020-11-17 01:39:51.349422",
"modified_by": "Administrator",
"module": "Justworks ERPNext Connector",
"name": "JW Employee Allocation",