[FIX] point_of_sale: set CSRF token
The introduction of the CSRF tokens in
8932c52e67 broke invoicing from the Point
of Sale. chrome.do_action('point_of_sale.pos_invoice_report') would
fail because no CSRF token is set in the POS. This fixes it using a
similar approach as in the website module.
This commit is contained in:
@@ -46,8 +46,13 @@
|
||||
});
|
||||
return web_client;
|
||||
});
|
||||
</script>
|
||||
|
||||
odoo.define('web.csrf', function (require) {
|
||||
var token = "<t t-esc="request.csrf_token(None)"/>";
|
||||
require('web.core').csrf_token = token;
|
||||
require('qweb').default_dict.csrf_token = token;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class='openerp openerp_webclient_container'>
|
||||
|
||||
Reference in New Issue
Block a user