fixes in setup control and website contact helper

This commit is contained in:
Anand Doshi 2013-01-21 19:02:58 +05:30
parent d707e2b6b6
commit fc36e57233
2 changed files with 3 additions and 3 deletions

View File

@ -236,7 +236,7 @@ class DocType:
on duplicate key update `password`=password(%s)""",
(user_email, pwd, pwd))
self.add_all_roles_to(pr.name)
add_all_roles_to(pr.name)
def add_all_roles_to(name):
profile = webnotes.doc("Profile", name)

View File

@ -36,7 +36,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
name = webnotes.conn.get_value("Lead", {"email_id": sender}, "name")
if name:
lead = webnotes.model_wrapper("Lead", name)
lead.doc.status = "Open"
lead.doc.status = status
lead.ignore_permissions = True
lead.save()
else:
@ -44,7 +44,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
"doctype":"Lead",
"lead_name": sender,
"email_id": sender,
"status": "Open",
"status": status,
"source": "Website"
})
lead.ignore_permissions = True