Disallowed End of Life Items from getting selected in Production Orders and Stock Reconciliation

This commit is contained in:
Neil Trini Lasrado
2015-07-21 13:27:18 +05:30
parent 9257413b68
commit 9c3dca63fa
4 changed files with 19 additions and 1 deletions

View File

@@ -98,3 +98,11 @@ cur_frm.cscript.company = function(doc, cdt, cdn) {
cur_frm.cscript.posting_date = function(doc, cdt, cdn){
erpnext.get_fiscal_year(doc.company, doc.posting_date);
}
cur_frm.fields_dict.items.grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
return {
filters:[
['Item', 'end_of_life', '>', frappe.datetime.now_datetime()]
]
}
}