[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

@ -99,4 +99,17 @@ frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
if(frm.doc.price_or_discount == 'Price') { if(frm.doc.price_or_discount == 'Price') {
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
}
}
}
}
}) })