Hi,
is there any way to save the filter in “Get Items” on Pick List.
We do need different Filters (Presets) like with serial without serial, from to warehouse, or status == to deliver and bill etc.
i cant find any way to save some filter presets
Hi,
is there any way to save the filter in “Get Items” on Pick List.
We do need different Filters (Presets) like with serial without serial, from to warehouse, or status == to deliver and bill etc.
i cant find any way to save some filter presets
Are you printing the pick list? Perhaps you can make some custom print formats if you don’t have too many unique filter requirements.
we scan the items (with success and fail sounds),
so the serialnumber is been assigned during the pick process
here is small working client script
with a simple filter “To Deliver and Bill”, u can modify like u want
if someone else needs a similar solution
frappe.ui.form.on(‘Pick List’, {
refresh: function(frm) {
if (frm.doc.docstatus === 0) {frm.add_custom_button(__('Aufträge (Liefern & Rechn.)'), function() { new frappe.ui.form.MultiSelectDialog({ doctype: "Sales Order", target: frm, setters: { customer: null, status: null }, add_filters_group: 1, get_query: function() { let my_filters = [ ['Sales Order', 'docstatus', '=', 1], ['Sales Order', 'status', '=', 'To Deliver and Bill'] ]; if (frm.doc.customer) { my_filters.push(['Sales Order', 'customer', '=', frm.doc.customer]); } return { filters: my_filters }; }, action: function(selections) { if (selections.length === 0) return; frappe.dom.freeze(__("Lade Auftragsdaten...")); let promises = selections.map(so_name => { return frappe.db.get_doc('Sales Order', so_name); }); Promise.all(promises).then(docs => { let items_added = false; docs.forEach(so_doc => { (so_doc.items || []).forEach(item => { let pending = item.qty - item.delivered_qty - item.picked_qty; if (pending > 0) { let row = frm.add_child("locations"); row.item_code = item.item_code; row.item_name = item.item_name; row.qty = pending; row.stock_qty = pending * item.conversion_factor; row.uom = item.stock_uom; row.conversion_factor = item.conversion_factor; row.sales_order = so_doc.name; row.sales_order_item = item.name; row.description = item.description; row.warehouse = item.warehouse; items_added = true; } }); }); if (items_added) { frm.refresh_field("locations"); // Hier versuchen wir die Lagerlogik sicher auszuführen try { frm.trigger('get_item_locations'); } catch (e) { console.log("Automatische Lagerzuweisung übersprungen/fehlerhaft (nicht kritisch)."); } } else { frappe.msgprint(__("Keine offenen Positionen gefunden.")); } frappe.dom.unfreeze(); cur_dialog.close(); }).catch(err => { frappe.dom.unfreeze(); console.error(err); // Fehlermeldung nur anzeigen, wenn wirklich nichts passiert ist (Liste leer) if(!frm.doc.locations || frm.doc.locations.length === 0) { frappe.msgprint(__("Es gab ein Problem beim Laden. (Siehe Konsole)")); } }); } }); }, __("Artikel abrufen")); } }});