[wsgi] [minor] fixed webnotes.local.form_dict
This commit is contained in:
parent
e863b7081b
commit
ad9638d5b3
5 changed files with 8 additions and 8 deletions
|
|
@ -70,7 +70,7 @@ def get_customer_supplier(args=None):
|
|||
Get Customer/Supplier, given a contact, if a unique match exists
|
||||
"""
|
||||
import webnotes
|
||||
if not args: args = webnotes.form_dict
|
||||
if not args: args = webnotes.local.form_dict
|
||||
if not args.get('contact'):
|
||||
raise Exception, "Please specify a contact to fetch Customer/Supplier"
|
||||
result = webnotes.conn.sql("""\
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def get(arg=None):
|
|||
@webnotes.whitelist()
|
||||
def edit(arg=None):
|
||||
import markdown2
|
||||
args = webnotes.form_dict
|
||||
args = webnotes.local.form_dict
|
||||
|
||||
d = Document('ToDo', args.get('name') or None)
|
||||
d.description = args['description']
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import webnotes
|
|||
def get(args=None):
|
||||
"""get assigned to"""
|
||||
if not args:
|
||||
args = webnotes.form_dict
|
||||
args = webnotes.local.form_dict
|
||||
return webnotes.conn.sql_list("""select owner from `tabToDo`
|
||||
where reference_type=%(doctype)s and reference_name=%(name)s
|
||||
order by modified desc limit 5""", args)
|
||||
|
|
@ -19,8 +19,8 @@ def get(args=None):
|
|||
def add(args=None):
|
||||
"""add in someone's to do list"""
|
||||
if not args:
|
||||
args = webnotes.form_dict
|
||||
|
||||
args = webnotes.local.form_dict
|
||||
|
||||
if webnotes.conn.sql("""select owner from `tabToDo`
|
||||
where reference_type=%(doctype)s and reference_name=%(name)s
|
||||
and owner=%(assign_to)s""", args):
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ def save_report():
|
|||
"""save report"""
|
||||
from webnotes.model.doc import Document
|
||||
|
||||
data = webnotes.form_dict
|
||||
data = webnotes.local.form_dict
|
||||
if webnotes.conn.exists('Report', data['name']):
|
||||
d = Document('Report', data['name'])
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def check_user_tags(dt):
|
|||
def add_tag():
|
||||
"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')
|
||||
dt, dn = f.get('dt'), f.get('dn')
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ def add_tag():
|
|||
@webnotes.whitelist()
|
||||
def remove_tag():
|
||||
"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')
|
||||
|
||||
DocTags(dt).remove(dn, tag)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue