[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

@@ -43,6 +43,9 @@ class DocType(SellingController):
if billed_qty:
total_qty = sum((item.qty for item in self.doclist.get({"parentfield": "delivery_note_details"})))
self.doc.fields["__billing_complete"] = billed_qty[0][0] == total_qty
def get_portal_page(self):
return "shipment" if self.doc.docstatus==1 else None
def get_contact_details(self):
return get_obj('Sales Common').get_contact_details(self,0)

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("Delivery Note", webnotes.form_dict.name)
context.update({
"parent_link": "shipments",
"parent_title": "Shipments"
})
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": "Shipments",
"method": "portal.templates.pages.shipments.get_shipments",
"icon": "icon-truck",
"empty_list_message": "No Shipments Found",
"page": "shipment"
})
return context
@webnotes.whitelist()
def get_shipments(start=0):
from portal.website_transactions import get_transaction_list
return get_transaction_list("Delivery Note", start)

View File

@@ -3,7 +3,7 @@
{% set title="Product Search" %}
{% block javascript %}
{% include "app/website/templates/js/product_list.js" %}
<script>{% include "app/stock/doctype/item/templates/includes/product_list.js" %}</script>
{% endblock %}
{% block content %}
@@ -17,7 +17,7 @@ $(document).ready(function() {
});
</script>
{% include 'app/website/templates/html/product_search_box.html' %}
{% include "app/stock/doctype/item/templates/includes/product_search_box.html" %}
<div class="col-md-12">
<h3 class="search-results">Search Results</h3>
<div id="search-list" class="row">

View File

@@ -0,0 +1,6 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
no_cache = True