Skip to content

Commit 154385d

Browse files
committed
Merge branch 'develop'
2 parents fcefc60 + 82e3038 commit 154385d

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

erpnext/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import unicode_literals
33
import frappe
44

5-
__version__ = '8.0.25'
5+
__version__ = '8.0.26'
66

77
def get_default_company(user=None):
88
'''Get default company for user'''

erpnext/patches/v8_0/merge_student_batch_and_student_group.py

+8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ def execute():
1313
frappe.reload_doctype("Student Group")
1414
student_batches = frappe.db.sql('''select name as student_group_name, student_batch_name as batch,
1515
program, academic_year, academic_term from `tabStudent Batch`''', as_dict=1)
16+
1617
for student_batch in student_batches:
18+
# create student batch name if does not exists !!
19+
if student_batch.get("batch") and not frappe.db.exists("Student Batch Name", student_batch.get("batch")):
20+
frappe.get_doc({
21+
"doctype": "Student Batch Name",
22+
"batch_name": student_batch.get("batch")
23+
}).insert(ignore_permissions=True)
24+
1725
student_batch.update({"doctype":"Student Group", "group_based_on": "Batch"})
1826
doc = frappe.get_doc(student_batch)
1927
student_list = frappe.db.sql('''select student, student_name, active from `tabStudent Batch Student`

erpnext/stock/doctype/item/item.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def set_attribute_context(self, context):
325325

326326
def set_disabled_attributes(self, context):
327327
"""Disable selection options of attribute combinations that do not result in a variant"""
328-
if not self.attributes:
328+
if not self.attributes or not self.has_variants:
329329
return
330330

331331
context.disabled_attributes = {}

erpnext/templates/pages/product_search.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from __future__ import unicode_literals
55
import frappe
6-
from frappe.utils import cstr, nowdate
6+
from frappe.utils import cstr, nowdate, cint
77
from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html
88

99
no_cache = 1
@@ -33,7 +33,7 @@ def get_product_list(search=None, start=0, limit=12):
3333
search = "%" + cstr(search) + "%"
3434

3535
# order by
36-
query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (start, limit)
36+
query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (cint(start), cint(limit))
3737

3838
data = frappe.db.sql(query, {
3939
"search": search,

erpnext/utilities/activation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_level():
3737
if frappe.db.count('Student') > 5:
3838
activation_level += 1
3939

40-
if frappe.db.count('Student Batch') > 5:
40+
if frappe.db.count('Student Batch Name') > 5:
4141
activation_level += 1
4242

4343
if frappe.db.count('Instructor') > 5:

0 commit comments

Comments
 (0)