diff options
| author | Damien Bouvy <dbo@odoo.com> | 2015-10-09 16:50:23 +0200 |
|---|---|---|
| committer | Damien Bouvy <dbo@odoo.com> | 2015-10-12 10:43:46 +0200 |
| commit | 486cd33091b23924a73dd5bc0dbaee59bb10d85d (patch) | |
| tree | 755f464efb656a0c64f0300a85780221f16a1fe4 /addons/website_quote/static/src/js/website_quotation.js | |
| parent | 81418ec14eda89b0d6036bdbc6c7731b56972aff (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/js/website_quotation.js')
| -rw-r--r-- | addons/website_quote/static/src/js/website_quotation.js | 3 |
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; }); |
