Merge pull request #34086 from s-aga-r/github-issue-33930

fix: create `Delivery Trip` from `Delivery Note` list
This commit is contained in:
Sagar Sharma 2023-02-15 22:40:10 +05:30 committed by GitHub
commit c793fb0bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ frappe.listview_settings['Delivery Note'] = {
return [__("Completed"), "green", "per_billed,=,100"]; return [__("Completed"), "green", "per_billed,=,100"];
} }
}, },
onload: function (listview) { onload: function (doclist) {
const action = () => { const action = () => {
const selected_docs = doclist.get_checked_items(); const selected_docs = doclist.get_checked_items();
const docnames = doclist.get_checked_items(true); const docnames = doclist.get_checked_items(true);
@ -56,14 +56,14 @@ frappe.listview_settings['Delivery Note'] = {
// doclist.page.add_actions_menu_item(__('Create Delivery Trip'), action, false); // doclist.page.add_actions_menu_item(__('Create Delivery Trip'), action, false);
listview.page.add_action_item(__('Create Delivery Trip'), action); doclist.page.add_action_item(__('Create Delivery Trip'), action);
listview.page.add_action_item(__("Sales Invoice"), ()=>{ doclist.page.add_action_item(__("Sales Invoice"), ()=>{
erpnext.bulk_transaction_processing.create(listview, "Delivery Note", "Sales Invoice"); erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Sales Invoice");
}); });
listview.page.add_action_item(__("Packaging Slip From Delivery Note"), ()=>{ doclist.page.add_action_item(__("Packaging Slip From Delivery Note"), ()=>{
erpnext.bulk_transaction_processing.create(listview, "Delivery Note", "Packing Slip"); erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Packing Slip");
}); });
} }
}; };