mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
[website] [minor] moving to framework
This commit is contained in:
@@ -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)
|
||||
|
||||
0
stock/doctype/delivery_note/templates/__init__.py
Normal file
0
stock/doctype/delivery_note/templates/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sale.html" %}
|
||||
16
stock/doctype/delivery_note/templates/pages/shipment.py
Normal file
16
stock/doctype/delivery_note/templates/pages/shipment.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("Delivery Note", webnotes.form_dict.name)
|
||||
context.update({
|
||||
"parent_link": "shipments",
|
||||
"parent_title": "Shipments"
|
||||
})
|
||||
return context
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "app/portal/templates/sales_transactions.html" %}
|
||||
24
stock/doctype/delivery_note/templates/pages/shipments.py
Normal file
24
stock/doctype/delivery_note/templates/pages/shipments.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": "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)
|
||||
@@ -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">
|
||||
|
||||
6
stock/doctype/item/templates/pages/product_search.py
Normal file
6
stock/doctype/item/templates/pages/product_search.py
Normal 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
|
||||
Reference in New Issue
Block a user