fixes to products
This commit is contained in:
parent
67d2c8396c
commit
002340080d
@ -5,12 +5,13 @@ erpnext.make_product_categories = function(wrapper) {
|
||||
wrapper.category_list = new wn.widgets.Listing({
|
||||
parent: $(wrapper).find('.web-side-section').get(0),
|
||||
query: 'select label, count(t2.name) as items, t1.item_group \
|
||||
from `tabProduct Group` t1, `tabItem` t2\
|
||||
from `tabProduct Group` t1, `tabProduct` t2, tabItem t3\
|
||||
where t1.parent="Products Settings" \
|
||||
and t2.item_group = t1.item_group \
|
||||
and ifnull(t2.show_in_website, 0)=1 \
|
||||
group by t2.item_group \
|
||||
order by t1.idx desc',
|
||||
and t2.item = t3.name \
|
||||
and t3.item_group = t1.item_group \
|
||||
and ifnull(t2.published, 0)=1 \
|
||||
group by t1.item_group \
|
||||
order by t1.idx',
|
||||
hide_refresh: true,
|
||||
render_row: function(parent, data) {
|
||||
parent.innerHTML = repl('<a href="#!products/%(label)s">%(label)s</a> (%(items)s)',
|
||||
|
@ -54,6 +54,7 @@ erpnext.products.make_product_list = function(wrapper) {
|
||||
t1.page_name, t1.short_description \
|
||||
from tabProduct t1, tabItem t2 \
|
||||
where t1.item = t2.name \
|
||||
and ifnull(t1.published,0)=1 \
|
||||
and t2.item_group="%(cat)s" \
|
||||
and t1.short_description like "%%(searchstr)s%"', args)
|
||||
},
|
||||
@ -63,7 +64,7 @@ erpnext.products.make_product_list = function(wrapper) {
|
||||
<div style="float:left; width: 400px">\
|
||||
<b><a href="#!%(page_name)s">%(title)s</a></b>\
|
||||
<p>%(short_description)s</p></div>\
|
||||
<div style="clear: both; margin-bottom: 7px;"></div>', data);
|
||||
<div style="clear: both; margin-bottom: 15px; border-bottom: 1px solid #AAA"></div>', data);
|
||||
}
|
||||
});
|
||||
|
||||
@ -81,4 +82,4 @@ erpnext.products.set_group = function() {
|
||||
|
||||
$(wrapper).find('h1').html(cat.label);
|
||||
wrapper.mainlist.run();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user