mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
fix: Move get items location button below items table
This commit is contained in:
@@ -27,14 +27,17 @@ frappe.ui.form.on('Pick List', {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
get_item_locations(frm) {
|
||||||
|
frm.call('set_item_locations');
|
||||||
|
},
|
||||||
refresh: (frm) => {
|
refresh: (frm) => {
|
||||||
frm.trigger('add_get_items_button');
|
frm.trigger('add_get_items_button');
|
||||||
|
|
||||||
if (frm.doc.items && (frm.doc.items.length > 1 || frm.doc.items[0].item_code) && frm.doc.docstatus === 0) {
|
// if (frm.doc.items && (frm.doc.items.length > 1 || frm.doc.items[0].item_code) && frm.doc.docstatus === 0) {
|
||||||
frm.add_custom_button(__('Get Item Locations'), () => {
|
// frm.add_custom_button(__('Get Item Locations'), () => {
|
||||||
frm.call('set_item_locations');
|
// frm.call('set_item_locations');
|
||||||
}).addClass('btn-primary');
|
// }).addClass('btn-primary');
|
||||||
}
|
// }
|
||||||
if (frm.doc.docstatus === 1) {
|
if (frm.doc.docstatus === 1) {
|
||||||
if (frm.doc.purpose === 'Delivery against Sales Order') {
|
if (frm.doc.purpose === 'Delivery against Sales Order') {
|
||||||
frm.add_custom_button(__('Delivery Note'), () => frm.trigger('create_delivery_note'), __('Create'));
|
frm.add_custom_button(__('Delivery Note'), () => frm.trigger('create_delivery_note'), __('Create'));
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"company",
|
"company",
|
||||||
"section_break_4",
|
"section_break_4",
|
||||||
"items",
|
"items",
|
||||||
|
"get_item_locations",
|
||||||
"section_break_6",
|
"section_break_6",
|
||||||
"locations",
|
"locations",
|
||||||
"amended_from"
|
"amended_from"
|
||||||
@@ -105,10 +106,16 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Material Request",
|
"label": "Material Request",
|
||||||
"options": "Material Request"
|
"options": "Material Request"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval: doc.items.length && (doc.items.length > 1 || doc.items[0].item_code) && doc.docstatus === 0",
|
||||||
|
"fieldname": "get_item_locations",
|
||||||
|
"fieldtype": "Button",
|
||||||
|
"label": "Get Item Locations"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2019-08-23 12:34:00.223445",
|
"modified": "2019-08-26 06:52:04.532885",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Pick List",
|
"name": "Pick List",
|
||||||
|
|||||||
@@ -159,16 +159,18 @@
|
|||||||
"fieldname": "material_request",
|
"fieldname": "material_request",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Material Request",
|
"label": "Material Request",
|
||||||
"options": "Material Request"
|
"options": "Material Request",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "material_request_item",
|
"fieldname": "material_request_item",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Material Request Item"
|
"label": "Material Request Item",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-08-23 14:13:11.088354",
|
"modified": "2019-08-26 06:54:06.783255",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Pick List Item",
|
"name": "Pick List Item",
|
||||||
|
|||||||
@@ -85,16 +85,18 @@
|
|||||||
"fieldname": "material_request",
|
"fieldname": "material_request",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Material Request",
|
"label": "Material Request",
|
||||||
"options": "Material Request"
|
"options": "Material Request",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "material_request_item",
|
"fieldname": "material_request_item",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Material Request Item"
|
"label": "Material Request Item",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-08-22 14:19:19.725540",
|
"modified": "2019-08-26 06:54:50.702552",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Pick List Reference Item",
|
"name": "Pick List Reference Item",
|
||||||
|
|||||||
Reference in New Issue
Block a user