Odoo Help


CSRF validation failed - where could be a problem?

Jakub Šedinár
on 5/25/16, 8:46 AM 1,900 views

Hello Guys,

I was kind of editing website layout (main layout, footers etc) and yesterday I noticed that when I want to add attachment (picture) via website wizard its not working – gives rounding arrows but no error in browser but I found Warning in logs: 20390 WARNING yyy.com openerp.http: CSRF validation failed on path '/web_editor/attachment/add'

Its working via attachments in settings window within administration part. Has anyone some though where the problem could be?

Site where I am working is kind of sensitive. So, If anyone has some idea or wanna help me directly, please contact me and I can provide more detailed data - what I cannot is access to the site - its just on the other database its working properly. So Its not in nginx proxy or something with sources. If communication will go outside of forum, I will share solution if we found any. 



Jakub Šedinár
On 5/25/16, 9:25 AM

okay, found the problem - there was some mistake, blankspace or I do not know what exactly -

Main Layout

<script type="text/javascript">

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;



well, It seems that when you push "format" on main layout cause the issue... it happend multiple times to me...

Jakub Šedinár - Sedinar.EU, Jakub Šedinár
on 1/3/17, 2:44 AM

Thanks a lot for this solution.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/25/16, 8:46 AM
Seen: 1900 times
Last updated: 10/28/16, 1:23 PM