frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.75k stars 7.3k forks source link

"Party Type" cannot be added #31858

Open blewsky opened 2 years ago

blewsky commented 2 years ago

Information about bug

This bug is known since several years (2018): https://discuss.erpnext.com/t/add-new-party-type/41993/

When the user wants to add/edit a party type, there is no option to do this.

image

There were several solutions suggested in the forum. One being to untick “user cannot create” option on Doctype of Party Type. This setting should be set as standard setting in ERPnext. There is no reason why the user should not be able to add/change the list of party types. image

Module

accounts, stock, buying, selling

Version

ERPNext: v13.36.3 (HEAD) Frappe Framework: v13.37.0 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

No response

techomniflo commented 2 years ago

Same issue

I found there is no option to write in this Party Type doctype. Party Type doctype is empty and has no data in it so I am not able to submit a payment entry because In the code of payment_entry.py dr_or_cr = ( "credit" if erpnext.get_party_account_type(self.party_type) == "Receivable" else "debit ) dr_or_cr is always Debit if Party Type doctype is empty. and on submission of payment entry shows error Debit and Credit not equal for Payment Entry #ACC-PAY-2022-00000. Difference is 24856.0. Please help to write in Party Type Doctype.

gouravsaini021 commented 2 years ago

For Developer Mode: By Uncheck field "User Cannot Create" in the Doctype setting of Party Type WhatsApp Image 2022-09-23 at 3 06 11 PM

For Production Mode If You are in Production Mode then update Json of Party Type Doctype by Following These Steps: Step 1: Go to apps/erpnext/erpnext/setup/doctype/party_type/party_type.json and open party_type.json Step 2: Update JSON to Mentioned Below: {"actions": [], "autoname": "field:party_type", "creation": "2016-12-26 11:26:51.508286", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ "party_type", "account_type" ], "fields": [ { "fieldname": "party_type", "fieldtype": "Link", "in_list_view": 1, "label": "Party Type", "options": "DocType", "reqd": 1, "unique": 1 }, { "fieldname": "account_type", "fieldtype": "Select", "in_list_view": 1, "label": "Account Type", "options": "Payable\nReceivable", "reqd": 1 } ], "links": [], "modified": "2022-08-27 18:26:13.911756", "modified_by": "Administrator", "module": "Setup", "name": "Party Type", "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { "create": 1, "email": 1, "export": 1, "print": 1, "read": 1, "report": 1, "role": "System Manager", "share": 1, "write": 1 }, { "create": 1, "email": 1, "export": 1, "print": 1, "read": 1, "report": 1, "role": "Accounts User", "share": 1, "write": 1 }, { "create": 1, "email": 1, "export": 1, "print": 1, "read": 1, "report": 1, "role": "Accounts Manager", "share": 1, "write": 1 } ], "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "states": [], "track_changes": 1 } Step3: Change "modified": "2022-08-27 18:26:13.911756", in JSON file to Latest Datetime Step4:Save party_type.json Step5:Run Command: Sudo Bench Migrate Sudo Bench Restart

konradbr commented 1 year ago

+1 to have this functionality

I guess I won't be trying to force a new party type until this is officially supported, but it would be a really useful option to have. Migrating from Odoo, we're also used to have "Partners" or "Contacts" who can have multiple functions (eg. both vendor and client), which corresponds to real-life situations. In the case of one of my companies, we literally have 4-5 different types ("Partner", "Author", "Manufacturer", etc.) with specific roles, and at times with multiple roles at once... it would be lovely to be able to replicate that in ERPnext.