Commit d1c94d6a authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Xiaowu Zhang

erp5_travel_expense: Harmonise front page list to display all documents necessary

parent 012c6828
......@@ -359,7 +359,7 @@
return getData(gadget)
.push(function (doc) {
var key;
if (doc.sync_flag === '1') {
if (doc.sync_flag === '1' && doc.simulation_state === "draft") {
sync = 1;
}
return gadget.put(gadget.options.jio_key, doc);
......@@ -372,6 +372,9 @@
})
.push(function () {
return gadget.props.geoGadget.createGeoLocationRecord();
})
.push(function () {
return gadget.redirect();
});
}
})
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>supercedriclen</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.57356.32253.30464</string> </value>
<value> <string>956.57543.33928.60006</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1485341787.05</float>
<float>1485352808.19</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -268,6 +268,9 @@
})
.push(function () {
alertify.success("Saved");
if (sync === 1) {
return gadget.redirect();
}
});
}
)
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>supercedriclen</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.57480.16314.62344</string> </value>
<value> <string>956.57517.36246.49305</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1485349157.61</float>
<float>1485352429.99</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -277,6 +277,9 @@
})
.push(function () {
alertify.success("Saved");
if (sync) {
return gadget.redirect();
}
});
}
)
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>supercedriclen</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.57361.9593.1092</string> </value>
<value> <string>956.57502.32307.34304</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1485341897.03</float>
<float>1485351571.43</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -54,7 +54,7 @@
<section class="">
<h3 class="ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span>
Expenses to Answer
Elements to Answer
</h3>
</section>
<section class="ui-body-c ui-content-section">
......@@ -63,7 +63,7 @@
<section class="">
<h3 class="ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span>
Expenses to Post
Elements to Post
</h3>
</section>
<section class="ui-body-c ui-content-section">
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>supercedriclen</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.54794.17747.54920</string> </value>
<value> <string>956.57534.1636.37307</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1485342857.58</float>
<float>1485352210.95</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -97,7 +97,7 @@
title: 'State'
}],
query: {
query: 'portal_type:("' + gadget.props.portal_type + '") AND state:"Suspended"',
query: 'portal_type:("% Record") AND state:"Suspended"',
select_list: ['doc_id', 'quantity', 'resource_title',
'comment', 'date', 'type_title',
'state'],
......@@ -109,29 +109,15 @@
select: 'comment',
title: 'Description'
}, {
select: 'type_title',
select: 'portal_type',
title: 'Type'
}, {
select: 'quantity',
title: 'Total Price'
}, {
select: 'resource_title',
title: 'Currency'
}, {
select: 'date',
title: 'Input Date'
}, {
select: 'doc_id',
title: 'ID'
}, {
select: 'state',
title: 'State'
}],
query: {
query: 'portal_type:("' + gadget.props.portal_type + '" OR "Expense Record Temp") AND sync_flag:"0"',
select_list: ['doc_id', 'quantity', 'resource_title',
'comment', 'date', 'type_title',
'state'],
query: '(simulation_state:"draft" OR sync_flag:"0")',
select_list: ['comment', 'portal_type', 'state'],
sort_on: [["modification_date", "descending"]]
}
})
......
......@@ -256,7 +256,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>supercedriclen</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.57372.34651.59340</string> </value>
<value> <string>956.57556.539.5205</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1485342563.92</float>
<float>1485353656.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -79,7 +79,7 @@
<string>my_quantity</string>
<string>my_date</string>
<string>my_comment</string>
<string>my_sync_flag</string>
<string>your_sync_flag</string>
<string>my_source_reference</string>
<string>my_copy_of</string>
<string>my_record_revision</string>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_sync_flag</string> </value>
<value> <string>your_sync_flag</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -193,7 +193,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value> <string>-1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -85,7 +85,7 @@
<string>your_simulation_state</string>
<string>my_title</string>
<string>your_state</string>
<string>my_sync_flag</string>
<string>your_sync_flag</string>
</list>
</value>
</item>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_sync_flag</string> </value>
<value> <string>your_sync_flag</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -152,6 +152,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -193,7 +197,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value> <string>-1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -79,7 +79,7 @@
<string>my_quantity</string>
<string>my_stop_date</string>
<string>my_comment</string>
<string>my_sync_flag</string>
<string>your_sync_flag</string>
<string>my_source_reference</string>
<string>my_copy_of</string>
<string>my_record_revision</string>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_sync_flag</string> </value>
<value> <string>your_sync_flag</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -152,6 +152,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -193,7 +197,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
<value> <string>-1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
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