fixed merge conflict
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 48b942e..f0ba6f2 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.1.17'
+__version__ = '7.1.18'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index e63c797..4cf9a67 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -27,7 +27,8 @@
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
- options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n')},
+ options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
+ depends_on: 'eval:doc.is_group && !doc.parent_account'},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
options: ['', 'Bank', 'Cash', 'Stock', 'Tax', 'Chargeable', 'Fixed Asset'].join('\n'),
description: __("Optional. This setting will be used to filter in various transactions.")
@@ -79,4 +80,4 @@
}
],
extend_toolbar: true
-}
\ No newline at end of file
+}
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index 60a1270..67646f6 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -14,7 +14,8 @@
class NamingSeries(Document):
def get_transactions(self, arg=None):
doctypes = list(set(frappe.db.sql_list("""select parent
- from `tabDocField` where fieldname='naming_series'""")
+ from `tabDocField` df where fieldname='naming_series' and
+ exists(select * from `tabDocPerm` dp, `tabRole` role where dp.role = role.name and dp.parent = df.parent and not role.disabled)""")
+ frappe.db.sql_list("""select dt from `tabCustom Field`
where fieldname='naming_series'""")))
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index 532452f..1cb0fcd 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -1691,7 +1691,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-23 11:40:31.739993",
+ "modified": "2016-11-23 12:33:37.728117",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index ced6a64..3d248d1 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -141,7 +141,7 @@
def make_route(self):
if not self.route:
- return frappe.db.get_value('Item Group', self.item_group, 'route') + '/' + self.scrub(self.item_name)
+ return cstr(frappe.db.get_value('Item Group', self.item_group, 'route')) + '/' + self.scrub(self.item_name)
def get_parents(self, context):
item_group, route = frappe.db.get_value('Item Group', self.item_group, ['name', 'route'])