-
Notifications
You must be signed in to change notification settings - Fork 23.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400: Bad Request in submit the form #10139
Comments
You are triggering CSRF protection and need to add a CSRF token to your form. |
@xmo-odoo Thanks it work for me |
Just add a hidden |
Thanks for your quick reply, it works for me after that i install wtform in my windows using "pip install WTForm" |
To my knowledge, neither Odoo nor any of the standard modules use wtforms, so I have no idea. Check the traceback and try to see what tries to import wtform. The package is called wtforms with an S though. |
Thanks for your reply |
@xmo-odoo is there a way to disable the CSRF protection? I'm trying to use the service via API and I want to be able to post to the server with tools like Postman and programatically with HTTP packages in Go. Thanks! |
@happilymarrieddad no. If you're writing your own endpoint, you can disable CSRF for it but that's mostly for things like API callbacks/webhooks (e.g. integration with Paypal or the like) which usually implement their own security. If you're trying to interact with Odoo programmatically, the proper way to do so is to use the XML-RPC API. |
hi i created one custom app in odoo v9
created model view and controller also but when i submit the form it display 400:bad request error
my model id
my controller for add address is
for that my view is
so now form is render properly in template but when i submit the form it return
"400: Bad Request" error
how can i solve this error
please help!!!
The text was updated successfully, but these errors were encountered: