fix: update set query for warehouse after changing the company (#22632)
* fix: update set query for warehouse after changing the company * fix: changed set_query to get_query * fix: variable filter doesn't get updated once set on load hence removed Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
parent
9e5aa282ec
commit
66d4b42df0
@ -49,17 +49,21 @@ frappe.ui.form.on('Material Request', {
|
||||
// set schedule_date
|
||||
set_schedule_date(frm);
|
||||
|
||||
let filters = {'company': frm.doc.company}
|
||||
|
||||
frm.set_query("warehouse", "items", function() {
|
||||
frm.set_query("warehouse", "items", function(doc) {
|
||||
return {
|
||||
filters: filters
|
||||
filters: {'company': doc.company}
|
||||
};
|
||||
});
|
||||
|
||||
frm.set_query("set_warehouse", function(){
|
||||
frm.set_query("set_warehouse", function(doc){
|
||||
return {
|
||||
filters: filters
|
||||
filters: {'company': doc.company}
|
||||
};
|
||||
});
|
||||
|
||||
frm.set_query("set_from_warehouse", function(doc){
|
||||
return {
|
||||
filters: {'company': doc.company}
|
||||
};
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user