[fix] [minor] merged with master

This commit is contained in:
Nabin Hait
2013-08-26 16:55:42 +05:30
37 changed files with 723 additions and 103 deletions

View File

@@ -1,22 +0,0 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
// License: GNU General Public License v3. See license.txt
// render
wn.listview_settings['Purchase Receipt'] = {
add_fields: ["group_concat(`tabPurchase Receipt Item`.prevdoc_docname) \
as purchase_order_no"],
add_columns: [{"content":"purchase_order_no", width:"30%"}],
group_by: "`tabPurchase Receipt`.name",
prepare_data: function(data) {
if(data.purchase_order_no) {
data.purchase_order_no = $.unique(data.purchase_order_no.split(","));
var po_list = [];
$.each(data.purchase_order_no, function(i, v){
if(po_list.indexOf(v)==-1) po_list.push(
repl("<a href=\"#Form/Purchase Order/%(name)s\">%(name)s</a>",
{name: v}));
});
data.purchase_order_no = po_list.join(", ");
}
}
};

View File

@@ -248,8 +248,7 @@ def reorder_item():
and exists (select name from `tabItem`
where `tabItem`.name = `tabBin`.item_code and
is_stock_item='Yes' and (is_purchase_item='Yes' or is_sub_contracted_item='Yes') and
(ifnull(end_of_life, '')='') or end_of_life > now())""",
as_dict=True)
(ifnull(end_of_life, '')='' or end_of_life > now()))""", as_dict=True)
for bin in bin_list:
#check if re-order is required
item_reorder = webnotes.conn.get("Item Reorder",
@@ -389,4 +388,4 @@ def repost():
"""
from webnotes.model.code import get_obj
for wh in webnotes.conn.sql("select name from tabWarehouse"):
get_obj('Warehouse', wh[0]).repost_stock()
get_obj('Warehouse', wh[0]).repost_stock()