Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2013-01-21 22:00:05 +05:30
commit c5cd52c5bc
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ def get_item_details(args):
"conversion_factor": 1,
"warehouse": args.warehouse or item.default_warehouse,
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
item_wrapper.doclist.get({"parentfield": "ref_rate_details"})))),
item_wrapper.doclist.get({"parentfield": "item_tax"})))),
"batch_no": None,
"expense_head": item.purchase_account,
"cost_center": item.cost_center

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