fix: Move get items location button below items table
This commit is contained in:
parent
9209570937
commit
a1dc152695
@ -27,14 +27,17 @@ frappe.ui.form.on('Pick List', {
|
||||
};
|
||||
});
|
||||
},
|
||||
get_item_locations(frm) {
|
||||
frm.call('set_item_locations');
|
||||
},
|
||||
refresh: (frm) => {
|
||||
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) {
|
||||
frm.add_custom_button(__('Get Item Locations'), () => {
|
||||
frm.call('set_item_locations');
|
||||
}).addClass('btn-primary');
|
||||
}
|
||||
// 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.call('set_item_locations');
|
||||
// }).addClass('btn-primary');
|
||||
// }
|
||||
if (frm.doc.docstatus === 1) {
|
||||
if (frm.doc.purpose === 'Delivery against Sales Order') {
|
||||
frm.add_custom_button(__('Delivery Note'), () => frm.trigger('create_delivery_note'), __('Create'));
|
||||
|
@ -15,6 +15,7 @@
|
||||
"company",
|
||||
"section_break_4",
|
||||
"items",
|
||||
"get_item_locations",
|
||||
"section_break_6",
|
||||
"locations",
|
||||
"amended_from"
|
||||
@ -105,10 +106,16 @@
|
||||
"fieldtype": "Link",
|
||||
"label": "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,
|
||||
"modified": "2019-08-23 12:34:00.223445",
|
||||
"modified": "2019-08-26 06:52:04.532885",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Pick List",
|
||||
|
@ -159,16 +159,18 @@
|
||||
"fieldname": "material_request",
|
||||
"fieldtype": "Link",
|
||||
"label": "Material Request",
|
||||
"options": "Material Request"
|
||||
"options": "Material Request",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "material_request_item",
|
||||
"fieldtype": "Data",
|
||||
"label": "Material Request Item"
|
||||
"label": "Material Request Item",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-08-23 14:13:11.088354",
|
||||
"modified": "2019-08-26 06:54:06.783255",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Pick List Item",
|
||||
|
@ -85,16 +85,18 @@
|
||||
"fieldname": "material_request",
|
||||
"fieldtype": "Link",
|
||||
"label": "Material Request",
|
||||
"options": "Material Request"
|
||||
"options": "Material Request",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "material_request_item",
|
||||
"fieldtype": "Data",
|
||||
"label": "Material Request Item"
|
||||
"label": "Material Request Item",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-08-22 14:19:19.725540",
|
||||
"modified": "2019-08-26 06:54:50.702552",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Pick List Reference Item",
|
||||
|
Loading…
x
Reference in New Issue
Block a user