Commit 1a6e8873 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Only display invoices to pay on main View

  On invoices tab, only display invoices Unpaid (missing payments).

  This makes easy the user know what is pending to pay and on the 'List all' tab, he can
  search old invoices (and view them all by date)
parent 0173ec07
...@@ -79,6 +79,8 @@ url_list = [ ...@@ -79,6 +79,8 @@ url_list = [
"gadget_slapos_annotated_helper.js", "gadget_slapos_annotated_helper.js",
"gadget_slapos_annotated_helper.html", "gadget_slapos_annotated_helper.html",
"gadget_slapos_annotated_helper.css", "gadget_slapos_annotated_helper.css",
"gadget_erp5_page_slap_all_invoice_list.html",
"gadget_erp5_page_slap_all_invoice_list.js",
"gadget_erp5_page_slap_invoice_list.html", "gadget_erp5_page_slap_invoice_list.html",
"gadget_erp5_page_slap_invoice_list.js", "gadget_erp5_page_slap_invoice_list.js",
"gadget_erp5_page_slap_load_schema.html", "gadget_erp5_page_slap_load_schema.html",
......
<!DOCTYPE html>
<html>
<!--
data-i18n=Date
data-i18n=Price
data-i18n=Currency
data-i18n=Payment
data-i18n=Download
data-i18n=Invoices
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Site List</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_all_invoice_list.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_pt_form_list.html" data-gadget-scope="form_list"></div>
</body>
</html>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_slap_all_invoice_list.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_page_slap_all_invoice_list_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget SlapOS Invoice List</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>003</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1508407715.77</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>985.50833.53035.15991</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1599533255.85</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1508407664.44</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("reload", "reload")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
return gadget.jio_allDocs(param_list[0])
.push(function (result) {
var i, value, len = result.data.total_rows;
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("start_date")) {
value = new Date(result.data.rows[i].value.start_date);
result.data.rows[i].value.start_date = {
"field_gadget_param": {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
date_only: true,
description: "The Date",
editable: 0,
hidden: 0,
hidden_day_is_last_day: 0,
"default": value.toUTCString(),
key: "date",
required: 0,
timezone_style: 0,
title: "Date",
type: "DateTimeField"
}
};
}
if (result.data.rows[i].value.hasOwnProperty("total_price")) {
value = window.parseFloat(result.data.rows[i].value.total_price);
// The field seemms not set precision to display
value = value.toFixed(2); // round on this case for 2 digits as
// float field is bugged.
result.data.rows[i].value.total_price = value;
}
if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].value.AccountingTransaction_getPaymentStateAsHateoas;
result.data.rows[i].value.AccountingTransaction_getPaymentStateAsHateoas = {
field_gadget_param : {
css_class: "",
description: "Payment State",
hidden: 0,
"default": {value: value},
key: "translated_simulation_state_title",
url: "gadget_slapos_invoice_state.html",
title: "Payment State",
type: "GadgetField"
}
};
result.data.rows[i].value.download = {
field_gadget_param : {
css_class: "",
description: "Download Invoice",
hidden: 0,
"default": {jio_key: value},
key: "download",
url: "gadget_slapos_invoice_printout.html",
title: "Download",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
}
return result;
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("triggerSubmit", function () {
var argument_list = arguments;
return this.getDeclaredGadget('form_list')
.push(function (gadget) {
return gadget.triggerSubmit.apply(gadget, argument_list);
});
})
.declareMethod("render", function () {
var gadget = this,
lines_limit,
invoices_translation,
translation_list = [
"Date",
"Price",
"Currency",
"Payment",
"Download",
"Invoices",
"Reference"
];
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_list'),
gadget.getSetting("listbox_lines_limit", 20),
gadget.getTranslationList(translation_list)
]);
})
.push(function (result) {
var column_list = [
['reference', result[2][6]],
['start_date', result[2][0]],
['total_price', result[2][1]],
['resource_reference', result[2][2]],
['AccountingTransaction_getPaymentStateAsHateoas', result[2][3]],
['download', result[2][4]]
],
form_list = result[0];
lines_limit = result[1];
invoices_translation = result[2][5];
return form_list.render({
erp5_document: {
"_embedded": {"_view": {
"listbox": {
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 0,
"editable_column_list": [],
"key": "slap_invoice_listbox",
"lines": lines_limit,
"list_method": "portal_catalog",
// XXX FIX ME: Missing default_destination_section_uid=person.getUid()
"query": "urn:jio:allDocs?query=(NOT%20title%3A%22Reversal%20Transaction%20for%20%25%22)%20AND%20(portal_type%3A%20%22Sale%20Invoice%20Transaction%22)",
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
"sort": [["creation_date", "descending"]],
"title": invoices_translation,
"type": "ListBox"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"bottom",
[["listbox"]]
]]
}
});
})
.push(function () {
return RSVP.all([
gadget.getSetting("hateoas_url"),
window.getSettingMe(gadget)
]);
})
.push(function (url_list) {
return RSVP.all([
gadget.jio_getAttachment("contract_relative_url",
url_list[0] + url_list[1] + "/Person_getCloudContractRelated?return_json=True"),
gadget.updatePanel({jio_key: "accounting_module"}),
gadget.getSetting('frontpage_gadget')
]);
})
.push(function (result) {
var promise_list = [
gadget.getUrlFor({command: "change", options: {"page": result[2]}}),
gadget.getUrlFor({command: "change", options: {"page": "slap_rss_ticket",
"jio_key": "accounting_module"}}),
gadget.getUrlFor({command: "change", options: {"page": 'slap_invoice_list'}})
];
if (result[0]) {
promise_list.push(
gadget.getUrlFor({command: "change", options: {"jio_key": result[0],
"page": "slap_controller"}})
);
}
return RSVP.all(promise_list);
})
.push(function (result) {
var header_dict = {
page_title: invoices_translation,
selection_url: result[0],
tab_url: result[2],
rss_url: result[1],
filter_action: true
};
if (result[3]) {
header_dict.contract_url = result[3];
}
return gadget.updateHeader(header_dict);
});
});
}(window, rJS, RSVP));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_slap_all_invoice_list.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_page_slap_all_invoice_list_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget SlapOS Invoice List</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>002</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1508407265.61</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.59414.5078.17476</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1659068942.39</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1508403813.01</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
result.data.rows[i].value.total_price = value; result.data.rows[i].value.total_price = value;
} }
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].value.AccountingTransaction_getPaymentStateAsHateoas;
result.data.rows[i].value.translated_simulation_state_title = { result.data.rows[i].value.AccountingTransaction_getPaymentStateAsHateoas = {
field_gadget_param : { field_gadget_param : {
css_class: "", css_class: "",
description: "Payment State", description: "Payment State",
hidden: 0, hidden: 0,
"default": {jio_key: value}, "default": {value: value},
key: "translated_simulation_state_title", key: "translated_simulation_state_title",
url: "gadget_slapos_invoice_state.html", url: "gadget_slapos_invoice_state.html",
title: "Payment State", title: "Payment State",
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
['start_date', result[2][0]], ['start_date', result[2][0]],
['total_price', result[2][1]], ['total_price', result[2][1]],
['resource_reference', result[2][2]], ['resource_reference', result[2][2]],
['translated_simulation_state_title', result[2][3]], ['AccountingTransaction_getPaymentStateAsHateoas', result[2][3]],
['download', result[2][4]] ['download', result[2][4]]
], ],
form_list = result[0]; form_list = result[0];
...@@ -142,9 +142,12 @@ ...@@ -142,9 +142,12 @@
"editable_column_list": [], "editable_column_list": [],
"key": "slap_invoice_listbox", "key": "slap_invoice_listbox",
"lines": lines_limit, "lines": lines_limit,
"list_method": "portal_catalog", "list_method": "AccountingTransactionModule_getUnpaidInvoiceList",
// XXX FIX ME: Missing default_destination_section_uid=person.getUid() "list_method_template": result[1] + "ERP5Document_getHateoas?mode=search&" +
"query": "urn:jio:allDocs?query=(NOT%20title%3A%22Reversal%20Transaction%20for%20%25%22)%20AND%20(portal_type%3A%20%22Sale%20Invoice%20Transaction%22)", "list_method=AccountingTransactionModule_getUnpaidInvoiceList&relative_url=" +
gadget.state.jio_key + "{&query,select_list*,limit*,sort_on*,local_roles*}",
"query": "urn:jio:allDocs?query=",
"portal_type": [], "portal_type": [],
"search_column_list": column_list, "search_column_list": column_list,
"sort_column_list": column_list, "sort_column_list": column_list,
...@@ -186,7 +189,8 @@ ...@@ -186,7 +189,8 @@
var promise_list = [ var promise_list = [
gadget.getUrlFor({command: "change", options: {"page": result[2]}}), gadget.getUrlFor({command: "change", options: {"page": result[2]}}),
gadget.getUrlFor({command: "change", options: {"page": "slap_rss_ticket", gadget.getUrlFor({command: "change", options: {"page": "slap_rss_ticket",
"jio_key": "accounting_module"}}) "jio_key": "accounting_module"}}),
gadget.getUrlFor({command: "change", options: {"page": 'slap_all_invoice_list'}})
]; ];
if (result[0]) { if (result[0]) {
promise_list.push( promise_list.push(
...@@ -200,13 +204,14 @@ ...@@ -200,13 +204,14 @@
var header_dict = { var header_dict = {
page_title: invoices_translation, page_title: invoices_translation,
selection_url: result[0], selection_url: result[0],
list_all_url: result[2],
rss_url: result[1], rss_url: result[1],
filter_action: true filter_action: true
}; };
if (result[2]) { if (result[3]) {
header_dict.contract_url = result[2]; header_dict.contract_url = result[3];
} }
return gadget.updateHeader(header_dict); return gadget.updateHeader(header_dict);
}); });
}); });
}(window, rJS, RSVP)); }(window, rJS, RSVP));
\ No newline at end of file
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
['transfer_url', 'Transfer', 'exchange'], ['transfer_url', 'Transfer', 'exchange'],
['accept_url', 'Accept', 'check-circle'], ['accept_url', 'Accept', 'check-circle'],
['reject_url', 'Reject', 'ban'], ['reject_url', 'Reject', 'ban'],
['contract_url', 'Contract', 'usd'] ['contract_url', 'Contract', 'usd'],
['list_all_url', 'Show all', 'eye']
], ],
header_button_template = function (data) { header_button_template = function (data) {
// <form><button name='{{name}}' data-i18n="{{title}}" type='submit' class='ui-icon-{{icon}} ui-btn-icon-left {{class}}'>{{title}}</button></form> // <form><button name='{{name}}' data-i18n="{{title}}" type='submit' class='ui-icon-{{icon}} ui-btn-icon-left {{class}}'>{{title}}</button></form>
...@@ -428,4 +429,4 @@ ...@@ -428,4 +429,4 @@
throw new Error("Unsupported button " + name); throw new Error("Unsupported button " + name);
}); });
}(window, rJS, document, RSVP)); }(window, rJS, document, RSVP));
\ No newline at end of file
...@@ -37,6 +37,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html ...@@ -37,6 +37,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html
web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
......
...@@ -34,6 +34,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html ...@@ -34,6 +34,8 @@ web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_html
web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js web_page_module/rjs_gadget_erp5_page_slap_add_software_installation_js
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html web_page_module/rjs_gadget_erp5_page_slap_add_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js web_page_module/rjs_gadget_erp5_page_slap_add_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_html
web_page_module/rjs_gadget_erp5_page_slap_all_invoice_list_js
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html web_page_module/rjs_gadget_erp5_page_slap_close_ticket_html
web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js web_page_module/rjs_gadget_erp5_page_slap_close_ticket_js
web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html web_page_module/rjs_gadget_erp5_page_slap_compute_node_get_token_html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment