Commit 52a2a300 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_travel_expense: don't save if it's readonly

parent fffb7722
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
state = getWorkflowState(options), state = getWorkflowState(options),
not_sync_checked; not_sync_checked;
gadget.options = options; gadget.options = options;
gadget.options.readonly = state.readonly;
return new RSVP.Queue() return new RSVP.Queue()
.push (function () { .push (function () {
...@@ -234,6 +235,9 @@ ...@@ -234,6 +235,9 @@
'submit', 'submit',
false, false,
function (submit_event) { function (submit_event) {
if (gadget.options.readonly) {
return;
}
return getSequentialID(gadget, 'LRR') return getSequentialID(gadget, 'LRR')
.push(function (source_reference) { .push(function (source_reference) {
var i, var i,
......
...@@ -66,9 +66,7 @@ ...@@ -66,9 +66,7 @@
<item> <item>
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple/>
<string>contributor/person_module/2</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
...@@ -250,7 +248,7 @@ ...@@ -250,7 +248,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.55194.7094.63129</string> </value> <value> <string>996.48024.29057.43229</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -268,7 +266,7 @@ ...@@ -268,7 +266,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631870226.12</float> <float>1639131883.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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