Odoo Help

Welcome!

This community 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.

0

How is cursor rollback handled in an HTTP routing context?

By
Atte Isopuro
on 8/13/14, 3:36 AM 916 views

This question concerns HTTP routing, not RPC-calls, so the the answer given here:

https://www.odoo.com/forum/help-1/question/how-to-rollback-a-record-if-exception-occurs-47846

does not apply. In writing this application I've noticed that an internal server error (everything from Syntax to Integrity) does NOT trigger a rollback: changes made before the exception are still there. Is there a way, in either Odoo or werkzeug, to easily make HTTP routes "safe", i.e make it so that if any exception occurrs while processing, the cursor is automatically rolled back to a state before the request was received? Wrapping every endpoint in a try/except is the best I've come up with, I was wondering if there was a better way?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/13/14, 3:36 AM
Seen: 916 times
Last updated: 3/16/15, 8:10 AM