Thursday, August 7, 2025
1 change · saas-18.3
Enhancements to existing features
This change lets the system confirm that a database operation has write access before attempting changes. It helps avoid noisy warnings and tracebacks in read-only situations, improving reliability for internal testing and transaction handling.
Original PR description
Before this commit, when a readonly transaction tried to write data, a warning would be logged upon raised psycopg2.errors.ReadOnlySqlTransaction The system would have to try to write before it would retry with a RW cursor. For some methods used in test, this can be an issue because the warning will raise a traceback. In this case, we would like a mechanism to make sure the cursor is RW before it tries and raise the ReadOnlySqlTransaction error. taskid-4982555 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr