summaryrefslogtreecommitdiff
path: root/addons/website_quote/static/src
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2015-10-09 16:50:23 +0200
committerDamien Bouvy <dbo@odoo.com>2015-10-12 10:43:46 +0200
commit486cd33091b23924a73dd5bc0dbaee59bb10d85d (patch)
tree755f464efb656a0c64f0300a85780221f16a1fe4 /addons/website_quote/static/src
parent81418ec14eda89b0d6036bdbc6c7731b56972aff (diff)
[FIX] website_quote: prevent modifying the quote state if it's already been processed
Before this fix, it was possible to validate then cancel a quote (or the other way around) simply by using two tabs in your browser. From now on, we only validate/cancel a quote if it's the 'sent' state and advise the customer of the situation if he tries to abuse the process.
Diffstat (limited to 'addons/website_quote/static/src')
-rw-r--r--addons/website_quote/static/src/js/website_quotation.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js
index 37f5e2a9a62..8a1a3fcf739 100644
--- a/addons/website_quote/static/src/js/website_quotation.js
+++ b/addons/website_quote/static/src/js/website_quotation.js
@@ -63,8 +63,9 @@ website.if_dom_contains('div.o_website_quote', function () {
'signer': signer_name,
'sign': sign?JSON.stringify(sign[1]):false,
}).then(function (data) {
+ var message_id = (data) ? 3 : 4;
$('#modelaccept').modal('hide');
- window.location.href = '/quote/'+order_id[1]+'/'+token+'?message=3';
+ window.location.href = '/quote/'+order_id[1]+'/'+token+'?message='+message_id;
});
return false;
});