Merge branch 'develop'
This commit is contained in:
commit
154385db1b
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '8.0.25'
|
__version__ = '8.0.26'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -13,7 +13,15 @@ def execute():
|
|||||||
frappe.reload_doctype("Student Group")
|
frappe.reload_doctype("Student Group")
|
||||||
student_batches = frappe.db.sql('''select name as student_group_name, student_batch_name as batch,
|
student_batches = frappe.db.sql('''select name as student_group_name, student_batch_name as batch,
|
||||||
program, academic_year, academic_term from `tabStudent Batch`''', as_dict=1)
|
program, academic_year, academic_term from `tabStudent Batch`''', as_dict=1)
|
||||||
|
|
||||||
for student_batch in student_batches:
|
for student_batch in student_batches:
|
||||||
|
# create student batch name if does not exists !!
|
||||||
|
if student_batch.get("batch") and not frappe.db.exists("Student Batch Name", student_batch.get("batch")):
|
||||||
|
frappe.get_doc({
|
||||||
|
"doctype": "Student Batch Name",
|
||||||
|
"batch_name": student_batch.get("batch")
|
||||||
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
student_batch.update({"doctype":"Student Group", "group_based_on": "Batch"})
|
student_batch.update({"doctype":"Student Group", "group_based_on": "Batch"})
|
||||||
doc = frappe.get_doc(student_batch)
|
doc = frappe.get_doc(student_batch)
|
||||||
student_list = frappe.db.sql('''select student, student_name, active from `tabStudent Batch Student`
|
student_list = frappe.db.sql('''select student, student_name, active from `tabStudent Batch Student`
|
||||||
|
@ -325,7 +325,7 @@ class Item(WebsiteGenerator):
|
|||||||
|
|
||||||
def set_disabled_attributes(self, context):
|
def set_disabled_attributes(self, context):
|
||||||
"""Disable selection options of attribute combinations that do not result in a variant"""
|
"""Disable selection options of attribute combinations that do not result in a variant"""
|
||||||
if not self.attributes:
|
if not self.attributes or not self.has_variants:
|
||||||
return
|
return
|
||||||
|
|
||||||
context.disabled_attributes = {}
|
context.disabled_attributes = {}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import cstr, nowdate
|
from frappe.utils import cstr, nowdate, cint
|
||||||
from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html
|
from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html
|
||||||
|
|
||||||
no_cache = 1
|
no_cache = 1
|
||||||
@ -33,7 +33,7 @@ def get_product_list(search=None, start=0, limit=12):
|
|||||||
search = "%" + cstr(search) + "%"
|
search = "%" + cstr(search) + "%"
|
||||||
|
|
||||||
# order by
|
# order by
|
||||||
query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (start, limit)
|
query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (cint(start), cint(limit))
|
||||||
|
|
||||||
data = frappe.db.sql(query, {
|
data = frappe.db.sql(query, {
|
||||||
"search": search,
|
"search": search,
|
||||||
|
@ -37,7 +37,7 @@ def get_level():
|
|||||||
if frappe.db.count('Student') > 5:
|
if frappe.db.count('Student') > 5:
|
||||||
activation_level += 1
|
activation_level += 1
|
||||||
|
|
||||||
if frappe.db.count('Student Batch') > 5:
|
if frappe.db.count('Student Batch Name') > 5:
|
||||||
activation_level += 1
|
activation_level += 1
|
||||||
|
|
||||||
if frappe.db.count('Instructor') > 5:
|
if frappe.db.count('Instructor') > 5:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user