justworks_erpnext/justworks_erpnext/install.py

12 lines
480 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe
from erpnext.accounts.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_name='justworks_erpnext')
acc_dims = get_accounting_dimensions(as_list=False)
for dim in acc_dims:
make_dimension_in_accounting_doctypes(dim, doclist=jw_doclist)