[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:
Joren Van Onder
2015-10-12 10:19:18 +02:00
parent 38db647534
commit 50c8b3d4ef
+6 -1
View File
@@ -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'>