How are the default forms generated in ERPNext?

Hello everyone,

I have a question. How is the printout for the Quotation doctype generated? I want to try and remove some aspects of the printout in the Quotation. Can someone point me to where the code for this is generated?

I know I can change the fields in the doctype, but I have some aspects of the Quotation that can’t be removed using the doctype list.

Any help is appreciated.

Hi @JohnDoe, did you check out the Print Format Builder?

Yes I have, but what I mean is how is the form for the doctype is generated(the part when you are actually entering information in)?

Cause let’s say I want to remove some of the options that are in the create button on the Quotation doctype. How would I do that?

I would suggest going through the framework documentation and playing around a bit in the system to understand:

https://frappeframework.com/docs/user/en/basics/doctypes

The videos are helpful too to get an overall understanding:

I already know a lot about the doctype and have gone through the documentation, but what I want to remove is the options in the create button. The Create button doesn’t appear in any of the doctypes so I can’t remove it through the front end.

I want to edit a feature on a default doctype. For example, I would like to remove an option from the Create button on the Default Quotation Doctype (I didn’t create this doctype on my own, it was already created when the app was installed).

Here’s a screenshot of what I want to edit/remove.

image

You have to Switch your your site In développement mode to édit standard erpnext doctype

I have enabled developer mode, but there is no Create Button in the doctype form. It is likely generated by a file within the doctype itself.

Buttons are generated from JS and are not configurable. You can add/edit using custom JS scripts.

Refer the following:
https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/custom-scripts/hide-buttons-in-form-view

https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/custom-scripts/custom-button

https://frappeframework.com/docs/user/en/guides/app-development/adding-custom-button-to-form

For your example button (presumably Quotation):

Sorry, I didn’t understand your problem.
That true if you want to remove option on this create button, you have to use frappe JS API.
Or may be with permissions and role, remove used permissions for your role. Like that the unwanted Doctype and his create button will no more be available.