mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 16:40:19 +00:00
Fixed version conflict
This commit is contained in:
@@ -20,7 +20,13 @@ frappe.ui.form.on("Item Group", {
|
||||
frm.trigger("set_root_readonly");
|
||||
frm.add_custom_button(__("Item Group Tree"), function() {
|
||||
frappe.set_route("Tree", "Item Group");
|
||||
}, "icon-sitemap");
|
||||
});
|
||||
|
||||
if(!frm.is_new()) {
|
||||
frm.add_custom_button(__("Items"), function() {
|
||||
frappe.set_route("List", "Item", {"item_group": frm.doc.name});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
set_root_readonly: function(frm) {
|
||||
|
||||
@@ -60,13 +60,15 @@ class ItemGroup(NestedSet, WebsiteGenerator):
|
||||
|
||||
def get_context(self, context):
|
||||
context.show_search=True
|
||||
context.page_length = 6
|
||||
context.search_link = '/product_search'
|
||||
|
||||
start = int(frappe.form_dict.start or 0)
|
||||
if start < 0:
|
||||
start = 0
|
||||
context.update({
|
||||
"items": get_product_list_for_group(product_group = self.name, start=start, limit=24, search=frappe.form_dict.get("search")),
|
||||
"items": get_product_list_for_group(product_group = self.name, start=start,
|
||||
limit=context.page_length, search=frappe.form_dict.get("search")),
|
||||
"parent_groups": get_parent_item_groups(self.name),
|
||||
"title": self.name,
|
||||
"products_as_list": cint(frappe.db.get_single_value('Website Settings', 'products_as_list'))
|
||||
|
||||
Reference in New Issue
Block a user