diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 833ddff223..618d106390 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '8.6.5' +__version__ = '8.6.6' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 226b17f7a2..967c1339f1 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -169,7 +169,6 @@ def create_variant(item, args): return variant - def copy_attributes_to_variant(item, variant): from frappe.model import no_value_fields @@ -189,6 +188,8 @@ def copy_attributes_to_variant(item, variant): variant.set(field.fieldname, item.get(field.fieldname)) variant.variant_of = item.name variant.has_variants = 0 + if not variant.description: + variant.description = '' if item.variant_based_on=='Item Attribute': if variant.attributes: diff --git a/erpnext/patches/v8_0/update_stock_qty_value_in_bom_item.py b/erpnext/patches/v8_0/update_stock_qty_value_in_bom_item.py index 9e95eb0c23..1f937bb8af 100644 --- a/erpnext/patches/v8_0/update_stock_qty_value_in_bom_item.py +++ b/erpnext/patches/v8_0/update_stock_qty_value_in_bom_item.py @@ -10,4 +10,5 @@ def execute(): frappe.reload_doc('manufacturing', 'doctype', 'bom_scrap_item') frappe.db.sql("update `tabBOM Item` set stock_qty = qty, uom = stock_uom, conversion_factor = 1") frappe.db.sql("update `tabBOM Explosion Item` set stock_qty = qty") - frappe.db.sql("update `tabBOM Scrap Item` set stock_qty = qty") \ No newline at end of file + if "qty" in frappe.db.get_table_columns("BOM Scrap Item"): + frappe.db.sql("update `tabBOM Scrap Item` set stock_qty = qty") \ No newline at end of file diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index ceeceaa3c9..6b503b3eec 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -16,8 +16,10 @@ def boot_session(bootinfo): update_page_info(bootinfo) load_country_and_currency(bootinfo) - bootinfo.sysdefaults.territory = get_root_of('Territory') - bootinfo.sysdefaults.customer_group = get_root_of('Customer Group') + bootinfo.sysdefaults.territory = frappe.db.get_single_value('Selling Settings', + 'territory') or get_root_of('Territory') + bootinfo.sysdefaults.customer_group = frappe.db.get_single_value('Selling Settings', + 'customer_group') or get_root_of('Customer Group') bootinfo.notification_settings = frappe.get_doc("Notification Control", "Notification Control")