Another way is to define a quick entry form, with your doctype name as prefix. Frappe will pick this one instead of the generic QuickEntryForm.
To access any fields from the calling doc, use frappe._from_link.doc
frappe.ui.form.BatchQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
render_dialog: async function() {
this._super();
let doc = this.doc;
let calling_doc = frappe._from_link?.doc;
// do your stuff
}
});