[website] [minor] moving to framework

This commit is contained in:
Anand Doshi
2013-09-10 18:29:39 +05:30
parent f2d0255031
commit b0d996ffb1
52 changed files with 606 additions and 199 deletions

View File

@@ -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)

View File

@@ -0,0 +1 @@
{% extends "app/portal/templates/sale.html" %}

View 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

View File

@@ -0,0 +1 @@
{% extends "app/portal/templates/sales_transactions.html" %}

View 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)