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

erp5_travel_expense: Synchronise if no synchronisation have been made

parent acccb00c
......@@ -72,7 +72,13 @@
return gadget.getSetting('last_sync_date');
})
.push(function (result) {
gadget.props.element.querySelector('.last_sync_date').innerHTML = result || 'not synchronize yet';
if (!result) {
return gadget.redirect({
page: 'sync',
auto_repair: true
});
}
gadget.props.element.querySelector('.last_sync_date').innerHTML = result;
gadget.props.portal_type = "Expense Record";
gadget.props.document_title_plural = "Expense Requests";
return RSVP.all([
......
......@@ -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>957.10736.21518.26248</string> </value>
<value> <string>957.21009.18378.49715</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1486476551.71</float>
<float>1487092895.73</float>
<string>UTC</string>
</tuple>
</state>
......
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