fix: warehouse address filtered based on warehouse
This commit is contained in:
parent
2aea184f6f
commit
e813684433
@ -23,6 +23,24 @@ frappe.ui.form.on('Stock Entry', {
|
||||
}
|
||||
});
|
||||
|
||||
frm.set_query('source_warehouse_address', function() {
|
||||
return {
|
||||
filters: {
|
||||
link_doctype: 'Warehouse',
|
||||
link_name: frm.doc.from_warehouse
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
frm.set_query('target_warehouse_address', function() {
|
||||
return {
|
||||
filters: {
|
||||
link_doctype: 'Warehouse',
|
||||
link_name: frm.doc.to_warehouse
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
frappe.db.get_value('Stock Settings', {name: 'Stock Settings'}, 'sample_retention_warehouse', (r) => {
|
||||
if (r.sample_retention_warehouse) {
|
||||
var filters = [
|
||||
@ -81,6 +99,9 @@ frappe.ui.form.on('Stock Entry', {
|
||||
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
setup_quality_inspection: function(frm) {
|
||||
if (!frm.doc.inspection_required) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user