Journal Entry Customizations

i need to add a new party and party types in Journal Entry .

For example i need to make a catgories For Hotels

Party Type:
Hotels

Party:
1- Hotel A
2- Hotel B
3- Hotel C

And a lso i need to add Employee in the party
so i got employess name by name in party type
and make an transaction against them

Hi @sheno,

You need to add Employee, Hotel next to Supplier in the below code

Thanks, Rohit

1 Like

Thx dear i added it according to your adivice and now i can selcet Employee and employee name But when i save the Journal entry i got an error message.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 876, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py”, line 755, in get_party_account_and_balance
account = get_party_account(party_type, party, company)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/party.py”, line 179, in get_party_account
group = frappe.db.get_value(party_type, party, scrub(party_group_doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 410, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 451, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 563, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘supplier_type’ in ‘field list’”)

waiting your sugessions
thanks a lot .