Fixes to microtemplate feature
This commit is contained in:
parent
7a4e739d6c
commit
03eadb74ab
@ -14,6 +14,10 @@ import frappe.defaults
|
||||
from erpnext.controllers.buying_controller import BuyingController
|
||||
from erpnext.accounts.party import get_party_account, get_due_date
|
||||
|
||||
form_grid_templates = {
|
||||
"entries": "templates/form_grid/item_grid.html"
|
||||
}
|
||||
|
||||
class PurchaseInvoice(BuyingController):
|
||||
tname = 'Purchase Invoice Item'
|
||||
fname = 'entries'
|
||||
|
@ -10,7 +10,7 @@
|
||||
{% if(frappe.datetime.get_diff(doc.due_date) < 0) { %}
|
||||
<span class="label label-danger filterable"
|
||||
title="{%= doc.get_formatted("due_date")%}"
|
||||
data-filter="outstanding_amount,>,0|due,<,Today">
|
||||
data-filter="outstanding_amount,>,0|due_date,<,Today">
|
||||
{%= __("Overdue: ") + comment_when(doc.due_date) %}
|
||||
</span>
|
||||
{% } else { %}
|
||||
@ -38,6 +38,8 @@
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,6 +38,8 @@
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted("grand_total_export") %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,6 +32,8 @@
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -186,7 +186,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2014-05-27 03:49:20.060872",
|
||||
"modified": "2014-08-07 06:57:15.274795",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier",
|
||||
@ -231,5 +231,6 @@
|
||||
"role": "Accounts User"
|
||||
}
|
||||
],
|
||||
"search_fields": "supplier_name,supplier_type"
|
||||
"search_fields": "supplier_name,supplier_type",
|
||||
"title_field": "supplier_name"
|
||||
}
|
@ -15,6 +15,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,14 +17,14 @@
|
||||
</span>
|
||||
{% } else { %}
|
||||
<span class="label label-warning filterable"
|
||||
data-filter="produced_qty,<,qty|status,!=,Stopped"
|
||||
data-filter="produced_qty,<,{%= doc.qty %}|status,!=,Stopped"
|
||||
title="{%= __("Pending") %}">
|
||||
{%= doc.get_formatted("expected_delivery_date")%}</span>
|
||||
{% } %}
|
||||
{% } %}
|
||||
{% if(per == 100 && doc.status!=="Stopped") { %}
|
||||
<span class="filterable text-muted"
|
||||
data-filter="produced_qty,=,qty|status,!=,Stopped">
|
||||
data-filter="produced_qty,=,{%= doc.qty %}|status,!=,Stopped">
|
||||
<i class="icon-ok-sign"></i></span>
|
||||
{% } %}
|
||||
{% if(doc.status==="Stopped") { %}
|
||||
|
@ -63,13 +63,12 @@ def get_events(start, end, filters=None):
|
||||
data = frappe.db.sql("""select name, exp_start_date, exp_end_date,
|
||||
subject, status, project from `tabTask`
|
||||
where ((ifnull(exp_start_date, '0000-00-00')!= '0000-00-00') \
|
||||
and (exp_start_date between '%(start)s' and '%(end)s') \
|
||||
and (exp_start_date between %(start)s and %(end)s) \
|
||||
or ((ifnull(exp_start_date, '0000-00-00')!= '0000-00-00') \
|
||||
and exp_end_date between '%(start)s' and '%(end)s'))
|
||||
%(conditions)s""" % {
|
||||
and exp_end_date between %(start)s and %(end)s))
|
||||
{conditions}""".format(conditions=conditions), {
|
||||
"start": start,
|
||||
"end": end,
|
||||
"conditions": conditions
|
||||
"end": end
|
||||
}, as_dict=True, update={"allDay": 0})
|
||||
|
||||
return data
|
||||
|
@ -1,4 +1,3 @@
|
||||
frappe.listview_settings['Time Log Batch'] = {
|
||||
add_fields: ["status", "total_hours", "rate"],
|
||||
filters:[["status","in", "Draft,Submitted"]]
|
||||
add_fields: ["status", "total_hours", "rate"]
|
||||
};
|
||||
|
@ -282,7 +282,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2014-05-27 03:49:09.208254",
|
||||
"modified": "2014-08-07 06:57:25.248707",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Customer",
|
||||
@ -332,5 +332,6 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"search_fields": "customer_name,customer_group,territory"
|
||||
"search_fields": "customer_name,customer_group,territory",
|
||||
"title_field": "customer_name"
|
||||
}
|
@ -24,6 +24,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,6 +41,8 @@
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,6 +24,8 @@
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_export') %}">
|
||||
{%= doc.get_formatted("grand_total_export") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -109,7 +109,7 @@
|
||||
"allow_on_submit": 0,
|
||||
"fieldname": "schedule_date",
|
||||
"fieldtype": "Date",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Required Date",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "schedule_date",
|
||||
@ -234,7 +234,7 @@
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"modified": "2014-07-18 01:04:18.470761",
|
||||
"modified": "2014-08-07 07:12:47.994668",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Material Request Item",
|
||||
|
@ -27,6 +27,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right">
|
||||
{%= doc.get_formatted("grand_total") %}
|
||||
<div class="text-ellipsis" title="{%= doc.get_formatted('grand_total_import') %}">
|
||||
{%= doc.get_formatted("grand_total_import") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,7 +22,9 @@
|
||||
{%= doc.from_warehouse %}
|
||||
</span>
|
||||
{% } %}
|
||||
<i class="icon-arrow-right text-muted"></i>
|
||||
{% if(doc.from_warehouse || doc.to_warehouse) { %}
|
||||
<i class="icon-arrow-right text-muted"></i>
|
||||
{% } %}
|
||||
{% if(doc.to_warehouse) { %}
|
||||
<span class="label label-primary filterable"
|
||||
data-filter="to_warehouse,=,{%= doc.to_warehouse %}">
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% var visible_columns = row.get_visible_columns(["item_code", "warehouse",
|
||||
"item_name", "description", "amount", "stock_uom", "uom", "qty"]); %}
|
||||
"item_name", "description", "amount", "stock_uom", "uom", "qty", "schedule_date"]); %}
|
||||
|
||||
{% if(!doc) { %}
|
||||
<div class="row">
|
||||
@ -16,7 +16,7 @@
|
||||
{% include "templates/form_grid/includes/visible_cols.html" %}
|
||||
{% if(doc.schedule_date) { %}
|
||||
<br><span title="{%= __("Reqd By Date") %}" class="label {%=
|
||||
(frappe.datetime.get_diff(doc.schedule_date) < 0
|
||||
(frappe.datetime.get_diff(doc.schedule_date, frappe.datetime.get_today()) < 0
|
||||
&& doc.ordered_qty < doc.qty)
|
||||
? "label-danger" : "label-default" %}">
|
||||
{%= doc.get_formatted("schedule_date") %}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user