multi sort for stock ledger search criteria
This commit is contained in:
parent
4a91f29d0f
commit
99e5ac3452
@ -1,4 +0,0 @@
|
|||||||
def execute():
|
|
||||||
import webnotes
|
|
||||||
from webnotes.modules import reload_doc
|
|
||||||
reload_doc('stock', 'Report', 'Stock Ledger')
|
|
@ -533,10 +533,6 @@ patch_list = [
|
|||||||
'patch_module': 'patches.august_2012',
|
'patch_module': 'patches.august_2012',
|
||||||
'patch_file': 'remove_cash_flow_statement',
|
'patch_file': 'remove_cash_flow_statement',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'patch_module': 'patches.august_2012',
|
|
||||||
'patch_file': 'reload_stock_ledger',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'patch_module': 'patches.september_2012',
|
'patch_module': 'patches.september_2012',
|
||||||
'patch_file': 'stock_report_permissions_for_accounts',
|
'patch_file': 'stock_report_permissions_for_accounts',
|
||||||
@ -545,4 +541,8 @@ patch_list = [
|
|||||||
'patch_module': 'patches.september_2012',
|
'patch_module': 'patches.september_2012',
|
||||||
'patch_file': 'communication_delete_permission',
|
'patch_file': 'communication_delete_permission',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.september_2012',
|
||||||
|
'patch_file': 'reload_criteria_stock_ledger',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
from webnotes.modules import reload_doc
|
||||||
|
reload_doc('stock', 'Search Criteria', 'Stock Ledger')
|
||||||
|
|
||||||
|
from webnotes.model import delete_doc
|
||||||
|
delete_doc("Report", "Stock Ledger")
|
@ -1,26 +0,0 @@
|
|||||||
# Report, Stock Ledger
|
|
||||||
[
|
|
||||||
|
|
||||||
# These values are common in all dictionaries
|
|
||||||
{
|
|
||||||
'creation': '2012-09-06 18:47:05',
|
|
||||||
'docstatus': 0,
|
|
||||||
'modified': '2012-09-06 18:48:22',
|
|
||||||
'modified_by': u'Administrator',
|
|
||||||
'owner': u'Administrator'
|
|
||||||
},
|
|
||||||
|
|
||||||
# These values are common for all Report
|
|
||||||
{
|
|
||||||
'doctype': 'Report',
|
|
||||||
'json': u'{"filters":[["Stock Ledger Entry","is_cancelled","=","No"]],"columns":[["item_code","Stock Ledger Entry"],["warehouse","Stock Ledger Entry"],["posting_date","Stock Ledger Entry"],["posting_time","Stock Ledger Entry"],["actual_qty","Stock Ledger Entry"],["bin_aqat","Stock Ledger Entry"],["voucher_type","Stock Ledger Entry"],["voucher_no","Stock Ledger Entry"]],"sort_by":"Stock Ledger Entry.posting_date","sort_order":"desc","sort_by_next":"Stock Ledger Entry.posting_time","sort_order_next":"desc"}',
|
|
||||||
'name': '__common__',
|
|
||||||
'ref_doctype': u'Stock Ledger Entry'
|
|
||||||
},
|
|
||||||
|
|
||||||
# Report, Stock Ledger
|
|
||||||
{
|
|
||||||
'doctype': 'Report',
|
|
||||||
'name': u'Stock Ledger'
|
|
||||||
}
|
|
||||||
]
|
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-04-16 11:42:44',
|
'creation': '2012-09-13 15:18:44',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-04-16 16:00:35',
|
'modified': '2012-09-13 15:19:44',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@ -23,7 +23,7 @@
|
|||||||
'module': u'Stock',
|
'module': u'Stock',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'page_len': 50,
|
'page_len': 50,
|
||||||
'sort_by': u'`tabStock Ledger Entry`.`item_code`',
|
'sort_by': u'`tabStock Ledger Entry`.`posting_date` DESC, `tabStock Ledger Entry`.`posting_time` DESC, `tabStock Ledger Entry`.`name` DESC',
|
||||||
'sort_order': u'DESC',
|
'sort_order': u'DESC',
|
||||||
'standard': u'Yes'
|
'standard': u'Yes'
|
||||||
},
|
},
|
||||||
|
@ -400,7 +400,7 @@ wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,f
|
|||||||
* lib/js/core.js
|
* lib/js/core.js
|
||||||
*/
|
*/
|
||||||
if(!console){var console={log:function(txt){}}}
|
if(!console){var console={log:function(txt){}}}
|
||||||
window._version_number="031a31bad930de7f9e8157242afbcba4729d91ff9f957c0c897cafd6";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
window._version_number="1e94c62f61174cfb7f98c2bdd377674ef06b81eff2e4d1c2dff88107";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lib/js/legacy/globals.js
|
* lib/js/legacy/globals.js
|
||||||
|
@ -287,7 +287,7 @@ wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,f
|
|||||||
* lib/js/core.js
|
* lib/js/core.js
|
||||||
*/
|
*/
|
||||||
if(!console){var console={log:function(txt){}}}
|
if(!console){var console={log:function(txt){}}}
|
||||||
window._version_number="031a31bad930de7f9e8157242afbcba4729d91ff9f957c0c897cafd6";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
window._version_number="1e94c62f61174cfb7f98c2bdd377674ef06b81eff2e4d1c2dff88107";$(document).ready(function(){wn.assets.check();wn.provide('wn.app');$.extend(wn.app,new wn.Application());});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lib/js/legacy/globals.js
|
* lib/js/legacy/globals.js
|
||||||
|
@ -171,10 +171,10 @@ _r.DataTable.prototype.set_asc=function(icon){this.sort_icon.src='images/lib/ico
|
|||||||
_r.DataTable.prototype.set_sort_option_disabled=function(label,disabled){var s=this.sort_sel;if(disabled){for(var i=0;i<s.options.length;i++){if(s.options[i]&&s.options[i].text==label){this.disabled_options[label]=s.options[i];s.remove(i);}}}else{if(this.disabled_options[label]){try{s.add(this.disabled_options[label],s.options[s.options.length-1]);}catch(e){try{s.add(this.disabled_options[label],s.options.length-1);}catch(e){}}
|
_r.DataTable.prototype.set_sort_option_disabled=function(label,disabled){var s=this.sort_sel;if(disabled){for(var i=0;i<s.options.length;i++){if(s.options[i]&&s.options[i].text==label){this.disabled_options[label]=s.options[i];s.remove(i);}}}else{if(this.disabled_options[label]){try{s.add(this.disabled_options[label],s.options[s.options.length-1]);}catch(e){try{s.add(this.disabled_options[label],s.options.length-1);}catch(e){}}
|
||||||
this.disabled_options[label]=null;}}}
|
this.disabled_options[label]=null;}}}
|
||||||
_r.DataTable.prototype.add_sort_option=function(label,val){var s=this.sort_sel;s.options[s.options.length]=new Option(label,val,false,s.options.length==0?true:false);}
|
_r.DataTable.prototype.add_sort_option=function(label,val){var s=this.sort_sel;s.options[s.options.length]=new Option(label,val,false,s.options.length==0?true:false);}
|
||||||
_r.DataTable.prototype.update_query=function(no_limit){if((_r.rb_con.cur_rb&&_r.rb_con.cur_rb.get_query)||(this.search_criteria&&this.search_criteria.custom_query)){}else{if(!sel_val(this.sort_sel)){this.sort_sel.selectedIndex=0;}
|
_r.DataTable.prototype.update_query=function(no_limit){if((_r.rb_con.cur_rb&&_r.rb_con.cur_rb.get_query)||(this.search_criteria&&this.search_criteria.custom_query)){}else{var sort_by=null,sort_order="";if(sel_val(this.sort_sel)){sort_by=sel_val(this.sort_sel);sort_order=this.sort_order;}else if(_r.rb_con.cur_rb.sc.sort_by){sort_by=_r.rb_con.cur_rb.sc.sort_by;sort_order="";}else{this.sort_sel.selectedIndex=0;sort_by=sel_val(this.sort_sel);sort_order=this.sort_order;}
|
||||||
this.query+=NEWLINE
|
this.query+=NEWLINE
|
||||||
+' ORDER BY '+sel_val(this.sort_sel)
|
+' ORDER BY '+sort_by
|
||||||
+' '+this.sort_order;}
|
+' '+sort_order;}
|
||||||
if(no_limit||this.no_limit){if(this.show_query)alert(this.query);return;}
|
if(no_limit||this.no_limit){if(this.show_query)alert(this.query);return;}
|
||||||
this.query+=' LIMIT '+(this.start_rec-1)+','+this.page_len;if(this.show_query)
|
this.query+=' LIMIT '+(this.start_rec-1)+','+this.page_len;if(this.show_query)
|
||||||
alert(this.query);}
|
alert(this.query);}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user