Merge branch 'master' into develop
This commit is contained in:
commit
7b78a83592
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '9.2.7'
|
__version__ = '9.2.8'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@ -185,7 +185,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals
|
|||||||
"page_len": page_len
|
"page_len": page_len
|
||||||
}, as_dict=as_dict)
|
}, as_dict=as_dict)
|
||||||
|
|
||||||
def bom(doctype, txt, searchfield, start, page_len, filters):
|
def bom(doctype, txt, searchfield, filters, start=0, page_len=20):
|
||||||
conditions = []
|
conditions = []
|
||||||
|
|
||||||
return frappe.db.sql("""select tabBOM.name, tabBOM.item
|
return frappe.db.sql("""select tabBOM.name, tabBOM.item
|
||||||
|
|||||||
@ -459,3 +459,4 @@ erpnext.patches.v9_0.copy_old_fees_field_data
|
|||||||
execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
||||||
erpnext.patches.v9_0.set_pos_profile_name
|
erpnext.patches.v9_0.set_pos_profile_name
|
||||||
erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings
|
erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings
|
||||||
|
execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
||||||
|
|||||||
@ -11,7 +11,7 @@ def execute():
|
|||||||
for pos in frappe.get_all(doctype, filters={'disabled': 0}):
|
for pos in frappe.get_all(doctype, filters={'disabled': 0}):
|
||||||
doc = frappe.get_doc(doctype, pos.name)
|
doc = frappe.get_doc(doctype, pos.name)
|
||||||
|
|
||||||
if not doc.user and doc.pos_profile_name: continue
|
if not doc.user or doc.pos_profile_name: continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
doc.pos_profile_name = doc.user + ' - ' + doc.company
|
doc.pos_profile_name = doc.user + ' - ' + doc.company
|
||||||
|
|||||||
@ -12,6 +12,7 @@ class StudentApplicant(Document):
|
|||||||
def autoname(self):
|
def autoname(self):
|
||||||
from frappe.model.naming import set_name_by_naming_series
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
if self.student_admission:
|
if self.student_admission:
|
||||||
|
naming_series = None
|
||||||
if self.program:
|
if self.program:
|
||||||
# set the naming series from the student admission if provided.
|
# set the naming series from the student admission if provided.
|
||||||
student_admission = get_student_admission_data(self.student_admission, self.program)
|
student_admission = get_student_admission_data(self.student_admission, self.program)
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class Item(WebsiteGenerator):
|
|||||||
self.validate_barcode()
|
self.validate_barcode()
|
||||||
self.cant_change()
|
self.cant_change()
|
||||||
self.validate_warehouse_for_reorder()
|
self.validate_warehouse_for_reorder()
|
||||||
self.update_item_desc()
|
self.update_bom_item_desc()
|
||||||
self.synced_with_hub = 0
|
self.synced_with_hub = 0
|
||||||
|
|
||||||
self.validate_has_variants()
|
self.validate_has_variants()
|
||||||
@ -599,13 +599,27 @@ class Item(WebsiteGenerator):
|
|||||||
row.label = label
|
row.label = label
|
||||||
row.description = desc
|
row.description = desc
|
||||||
|
|
||||||
def update_item_desc(self):
|
def update_bom_item_desc(self):
|
||||||
if frappe.db.get_value('BOM',self.name, 'description') != self.description:
|
if self.is_new(): return
|
||||||
frappe.db.sql("""update `tabBOM` set description = %s where item = %s and docstatus < 2""",(self.description, self.name))
|
|
||||||
frappe.db.sql("""update `tabBOM Item` set description = %s where
|
if self.db_get('description') != self.description:
|
||||||
item_code = %s and docstatus < 2""",(self.description, self.name))
|
frappe.db.sql("""
|
||||||
frappe.db.sql("""update `tabBOM Explosion Item` set description = %s where
|
update `tabBOM`
|
||||||
item_code = %s and docstatus < 2""",(self.description, self.name))
|
set description = %s
|
||||||
|
where item = %s and docstatus < 2
|
||||||
|
""", (self.description, self.name))
|
||||||
|
|
||||||
|
frappe.db.sql("""
|
||||||
|
update `tabBOM Item`
|
||||||
|
set description = %s
|
||||||
|
where item_code = %s and docstatus < 2
|
||||||
|
""", (self.description, self.name))
|
||||||
|
|
||||||
|
frappe.db.sql("""
|
||||||
|
update `tabBOM Explosion Item`
|
||||||
|
set description = %s
|
||||||
|
where item_code = %s and docstatus < 2
|
||||||
|
""", (self.description, self.name))
|
||||||
|
|
||||||
def update_template_item(self):
|
def update_template_item(self):
|
||||||
"""Set Show in Website for Template Item if True for its Variant"""
|
"""Set Show in Website for Template Item if True for its Variant"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user