2014-04-18 10:45:31 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
|
|
import frappe.website.render
|
|
|
|
|
2014-06-27 15:32:55 +00:00
|
|
|
page_title = "Partners"
|
|
|
|
|
2014-04-18 10:45:31 +00:00
|
|
|
def get_context(context):
|
2014-06-27 15:32:55 +00:00
|
|
|
partners = frappe.db.sql("""select * from `tabSales Partner`
|
|
|
|
where show_in_website=1 order by name asc""", as_dict=True)
|
|
|
|
|
|
|
|
for p in partners:
|
|
|
|
p.route = frappe.get_doc("Sales Partner", p.name).get_route()
|
|
|
|
|
2014-04-18 10:45:31 +00:00
|
|
|
return {
|
2014-06-27 15:32:55 +00:00
|
|
|
"partners": partners,
|
|
|
|
"title": page_title
|
2014-04-18 10:45:31 +00:00
|
|
|
}
|