Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 1 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors |
| 2 | # License: GNU General Public License v3. See license.txt |
| 3 | |
| 4 | from __future__ import unicode_literals |
| 5 | import frappe |
Neil Trini Lasrado | d718c93 | 2014-10-22 15:56:38 +0530 | [diff] [blame] | 6 | from erpnext.templates.utils import get_currency_context |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 7 | |
| 8 | no_cache = 1 |
| 9 | no_sitemap = 1 |
| 10 | |
| 11 | def get_context(context): |
| 12 | shipments_context = get_currency_context() |
| 13 | shipments_context.update({ |
| 14 | "title": "Shipments", |
Neil Trini Lasrado | d718c93 | 2014-10-22 15:56:38 +0530 | [diff] [blame] | 15 | "method": "erpnext.templates.pages.shipments.get_shipments", |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 16 | "icon": "icon-truck", |
| 17 | "empty_list_message": "No Shipments Found", |
| 18 | "page": "shipment" |
| 19 | }) |
| 20 | return shipments_context |
| 21 | |
| 22 | @frappe.whitelist() |
| 23 | def get_shipments(start=0): |
Neil Trini Lasrado | d718c93 | 2014-10-22 15:56:38 +0530 | [diff] [blame] | 24 | from erpnext.templates.utils import get_transaction_list |
Rushabh Mehta | 3daa49a | 2014-10-21 16:16:30 +0530 | [diff] [blame] | 25 | return get_transaction_list("Delivery Note", start) |