2015-03-03 09:25:30 +00:00
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2014-04-18 10:45:31 +00:00
|
|
|
# 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
|
|
|
}
|