Hello all! We just started using the Frappe Framework and we are loving it! We are struggling a bit learning everything, but we are learning the best we can!
In a custom app, we have a button that we want to open a dialog for creating a new document. I found the Dialog API page, but do not want to re-create a creation form for a DocType that already exists.
We noticed that there is this functionality elsewhere. I am currently digging through ERPNext’s source code to find exactly how this was done, but if there is a quicker solution or a specific doc page on this, the help would be much appreciated!
Awesome! I am hoping to wrap all these changes into one Frappe app. Perhaps a little more context would help with this issue:
We are extending the recent in-house Delivery features; adding tools to build Delivery Trips off of mapped Delivery Notes+Sales Orders viewed on Google Maps. Our use case makes adding individual Delivery Notes to Trips very difficult (155+ deliveries, two trips per truck daily!) Once proofed, I would love to see its integration into ERPNext!
The page and necessary API pulls the Delivery Notes, Trips, and the Google API key. While reading and viewing Documents are fairly simple (and well documented!), we have yet to be able to create a Delivery Trip in a dialog (like Quick Entry!).
There is no need to recreate DocTypes, right? Is there a way to set the “Quick Entry” option on a Form or DocType via hooks.py on app installation?
With the Quick Entry option enabled, how would I get a page button field or page action button to open the Quick Entry form?
How would I get a page button field or page action button to open the Quick Entry form?
let new_doc = page.set_secondary_action('New <MyDoc>', () => {
frappe.ui.form.make_quick_entry('MyDoc');
});
Cheers!
Note: A Quick Entry JS object must be defined elsewhere, similar to how ERPNext’s Customer Quick Entry box is defined. Otherwise, it will just redirect to the New Document page.
Update: Turns out, even with an object like that (to add more fields), the redirect still happens.