mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
[website] [minor] moving to framework
This commit is contained in:
@@ -148,6 +148,9 @@ class DocType(SellingController):
|
||||
self.validate_recurring_invoice()
|
||||
self.convert_to_recurring()
|
||||
|
||||
def get_portal_page(self):
|
||||
return "invoice" if self.doc.docstatus==1 else None
|
||||
|
||||
def set_missing_values(self, for_validate=False):
|
||||
self.set_pos_fields(for_validate)
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sale.html" %}
|
||||
16
accounts/doctype/sales_invoice/templates/pages/invoice.py
Normal file
16
accounts/doctype/sales_invoice/templates/pages/invoice.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_transaction_context
|
||||
context = get_transaction_context("Sales Invoice", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "invoices",
|
||||
"parent_title": "Invoices"
|
||||
})
|
||||
return context
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sales_transactions.html" %}
|
||||
24
accounts/doctype/sales_invoice/templates/pages/invoices.py
Normal file
24
accounts/doctype/sales_invoice/templates/pages/invoices.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
no_cache = True
|
||||
|
||||
def get_context():
|
||||
from portal.website_transactions import get_currency_context
|
||||
context = get_currency_context()
|
||||
context.update({
|
||||
"title": "Invoices",
|
||||
"method": "portal.templates.pages.invoices.get_invoices",
|
||||
"icon": "icon-file-text",
|
||||
"empty_list_message": "No Invoices Found",
|
||||
"page": "invoice"
|
||||
})
|
||||
return context
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_invoices(start=0):
|
||||
from portal.website_transactions import get_transaction_list
|
||||
return get_transaction_list("Sales Invoice", start)
|
||||
Reference in New Issue
Block a user