@@ -70,7 +70,7 @@ def get_customer_supplier(args=None): | |||||
Get Customer/Supplier, given a contact, if a unique match exists | Get Customer/Supplier, given a contact, if a unique match exists | ||||
""" | """ | ||||
import webnotes | import webnotes | ||||
if not args: args = webnotes.form_dict | |||||
if not args: args = webnotes.local.form_dict | |||||
if not args.get('contact'): | if not args.get('contact'): | ||||
raise Exception, "Please specify a contact to fetch Customer/Supplier" | raise Exception, "Please specify a contact to fetch Customer/Supplier" | ||||
result = webnotes.conn.sql("""\ | result = webnotes.conn.sql("""\ | ||||
@@ -17,7 +17,7 @@ def get(arg=None): | |||||
@webnotes.whitelist() | @webnotes.whitelist() | ||||
def edit(arg=None): | def edit(arg=None): | ||||
import markdown2 | import markdown2 | ||||
args = webnotes.form_dict | |||||
args = webnotes.local.form_dict | |||||
d = Document('ToDo', args.get('name') or None) | d = Document('ToDo', args.get('name') or None) | ||||
d.description = args['description'] | d.description = args['description'] | ||||
@@ -10,7 +10,7 @@ import webnotes | |||||
def get(args=None): | def get(args=None): | ||||
"""get assigned to""" | """get assigned to""" | ||||
if not args: | if not args: | ||||
args = webnotes.form_dict | |||||
args = webnotes.local.form_dict | |||||
return webnotes.conn.sql_list("""select owner from `tabToDo` | return webnotes.conn.sql_list("""select owner from `tabToDo` | ||||
where reference_type=%(doctype)s and reference_name=%(name)s | where reference_type=%(doctype)s and reference_name=%(name)s | ||||
order by modified desc limit 5""", args) | order by modified desc limit 5""", args) | ||||
@@ -19,8 +19,8 @@ def get(args=None): | |||||
def add(args=None): | def add(args=None): | ||||
"""add in someone's to do list""" | """add in someone's to do list""" | ||||
if not args: | if not args: | ||||
args = webnotes.form_dict | |||||
args = webnotes.local.form_dict | |||||
if webnotes.conn.sql("""select owner from `tabToDo` | if webnotes.conn.sql("""select owner from `tabToDo` | ||||
where reference_type=%(doctype)s and reference_name=%(name)s | where reference_type=%(doctype)s and reference_name=%(name)s | ||||
and owner=%(assign_to)s""", args): | and owner=%(assign_to)s""", args): | ||||
@@ -257,7 +257,7 @@ def save_report(): | |||||
"""save report""" | """save report""" | ||||
from webnotes.model.doc import Document | from webnotes.model.doc import Document | ||||
data = webnotes.form_dict | |||||
data = webnotes.local.form_dict | |||||
if webnotes.conn.exists('Report', data['name']): | if webnotes.conn.exists('Report', data['name']): | ||||
d = Document('Report', data['name']) | d = Document('Report', data['name']) | ||||
else: | else: | ||||
@@ -39,7 +39,7 @@ def check_user_tags(dt): | |||||
def add_tag(): | def add_tag(): | ||||
"adds a new tag to a record, and creates the Tag master" | "adds a new tag to a record, and creates the Tag master" | ||||
f = webnotes.form_dict | |||||
f = webnotes.local.form_dict | |||||
tag, color = f.get('tag'), f.get('color') | tag, color = f.get('tag'), f.get('color') | ||||
dt, dn = f.get('dt'), f.get('dn') | dt, dn = f.get('dt'), f.get('dn') | ||||
@@ -50,7 +50,7 @@ def add_tag(): | |||||
@webnotes.whitelist() | @webnotes.whitelist() | ||||
def remove_tag(): | def remove_tag(): | ||||
"removes tag from the record" | "removes tag from the record" | ||||
f = webnotes.form_dict | |||||
f = webnotes.local.form_dict | |||||
tag, dt, dn = f.get('tag'), f.get('dt'), f.get('dn') | tag, dt, dn = f.get('tag'), f.get('dt'), f.get('dn') | ||||
DocTags(dt).remove(dn, tag) | DocTags(dt).remove(dn, tag) | ||||