I have a use case that requires the Customer DocType to be submittable. Since one can’t use the ‘Custom Field’ or ‘Customize Form’ to change a DocType meta, I have created the following patch:
@cpurbaugh I had tried that but the changes are being made to customer.json in erpnext app with no way of exporting as fixtures. This is important since I need a way of sharing the changes with the other developers.
@ahmed_personal That sounds promising, Could you provide more details about how to do that?
@rmehta basically, the customer has to go through an approval process. So, we have to define a workflow with the following states Pending(docstatus 0) > Approved(docstatus 1) > Accepted(docstatus 1). Once we did that, the system complained that the Customer doctype is not submittable. Of course, we can change that in the doctype form but then we will not be able to export the change as a fixture.
Sorry for bumping this 3 year old thread, but I had a similiar use case issue here.
Basically the end user wants the Customers Details to go through a series of approval process before it can be accepted in the system as “Valid Customers” .
I’ve already went ahead to create the relevant workflow approval process and also switched on “Submittable” on the forms.
Now the problem I face is, irregardless if the Customer details have been approved or not, the salesperson can still select the customer in other forms (Such as Quotations, Sales Order , Sales Invoice) even if the Customer Details’ docstate is “Rejected. Draft or Pending Approval” .
Although the same can be achieved by setting workflow state + workflow level permission, but i prefer not to do this as each user will need up to 3-4 user permissions to be able to access one single document. This coupled with a large amount of users that needs to be created will cause a large amount of work when creating accounts. Therefore, we still prefer to know if it’s possible to go the Doctype = 1 route instead.
My question is this: How do I force the system to only allow the Customer Details to be come active and “Selectable” when the docstate is 1 (not just 0, 1 and 2). ??