Python 3 compatibility syntax error fixes (#10519)

* Use Python 3 style print function

* Use 'Exception as e' instead of 'Exception, e'

* Unpack tuple arguments explicitly in instead of relying on auto unpacking

* Use consistent indentation

* Use 0 if stock_frozen_upto_days is None
This commit is contained in:
Aditya Hase
2017-08-28 18:17:36 +05:30
committed by Rushabh Mehta
parent 7ed4bfe7ee
commit 6ccb6562f1
43 changed files with 141 additions and 138 deletions

View File

@@ -68,8 +68,8 @@ def get_list_for_transactions(doctype, txt, filters, limit_start, limit_page_len
if txt:
if meta.get_field('items'):
if meta.get_field('items').options:
child_doctype = meta.get_field('items').options
for item in frappe.get_all(child_doctype, {"item_name": ['like', "%" + txt + "%"]}):
child_doctype = meta.get_field('items').options
for item in frappe.get_all(child_doctype, {"item_name": ['like', "%" + txt + "%"]}):
child = frappe.get_doc(child_doctype, item.name)
or_filters.append([doctype, "name", "=", child.parent])