[Fix] Pricing rule issue

This commit is contained in:
Rohit Waghchaure 2016-07-07 12:22:22 +05:30
parent 6a66138764
commit 2b590fd804

View File

@ -100,3 +100,16 @@ frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
frm.set_value('for_price_list', "") frm.set_value('for_price_list', "")
} }
}) })
frappe.ui.form.on('Pricing Rule', {
setup: function(frm) {
frm.fields_dict["for_price_list"].get_query = function(doc){
return {
filters: {
'selling': doc.selling,
'buying': doc.buying
}
}
}
}
})