cfa20f3effc87ffcc21d282cee558da7343824bf
The `_error_checking()` context manager is used to perform validation and cleanup after changes on work entries, and is implemented using a try/finally clause. This mechanism fails to take into account that the alteration operation can fail due to a concurrent update (in another transaction). In such a situation the db cursor becomes instantly invalid, and any attempt to use it will fail with: `psycopg2.InternalError: current transaction is aborted`. This exception will be raised in the `finally` block, and will therefore discard the original TransactionRollbackException. The result: instead of being silently retried as expected, the transaction fails and the user receives a cryptic error message. Steps to repro: repeatedly click on the button to validate a leave Solution: specifically handle PostgreSQL `OperationalError` exceptions and do not attempt to use the cursor when they occur - just let the exception bubble up. closes odoo/odoo#59612 X-original-commit: 7ba47e7215df69b6556a848532e4f33ef4243e83 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%