fix: bom comparison issue

This commit is contained in:
Rohit Waghchaure
2020-03-19 10:03:06 +05:30
parent b4909b8fd2
commit d9469137cc
2 changed files with 20 additions and 2 deletions

View File

@@ -22,7 +22,14 @@ erpnext.BOMComparisonTool = class BOMComparisonTool {
fieldname: 'name1',
fieldtype: 'Link',
options: 'BOM',
change: () => this.fetch_and_render()
change: () => this.fetch_and_render(),
get_query: () => {
return {
filters: {
"name": ["not in", [this.form.get_value("name2") || ""]]
}
}
}
},
{
fieldtype: 'Column Break'
@@ -32,7 +39,14 @@ erpnext.BOMComparisonTool = class BOMComparisonTool {
fieldname: 'name2',
fieldtype: 'Link',
options: 'BOM',
change: () => this.fetch_and_render()
change: () => this.fetch_and_render(),
get_query: () => {
return {
filters: {
"name": ["not in", [this.form.get_value("name1") || ""]]
}
}
}
},
{
fieldtype: 'Section Break'