diff --git a/README.md b/README.md index 0d259c0b0ae..e16bdda490e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ addon | version | maintainers | summary [autovacuum_message_attachment](autovacuum_message_attachment/) | 18.0.1.0.1 | florian-dacosta | Automatically delete old mail messages and attachments [base_conditional_image](base_conditional_image/) | 18.0.1.0.0 | | This module extends the functionality to support conditional images [base_cron_exclusion](base_cron_exclusion/) | 18.0.1.0.1 | LoisRForgeFlow ChrisOForgeFlow | Allow you to select scheduled actions that should not run simultaneously. -[base_exception](base_exception/) | 18.0.1.1.2 | hparfr sebastienbeau | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...) +[base_exception](base_exception/) | 18.0.1.2.0 | hparfr sebastienbeau | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...) [base_fontawesome](base_fontawesome/) | 18.0.2.0.0 | | Up to date Fontawesome resources. [base_fontawesome_web_editor](base_fontawesome_web_editor/) | 18.0.1.0.0 | | Integration between base_fontawesome and web_editor for FontAwesome >= 6.7.2 support. [base_force_record_noupdate](base_force_record_noupdate/) | 18.0.1.0.0 | | Manually force noupdate=True on models diff --git a/base_exception/README.rst b/base_exception/README.rst index 0987d5141ee..7e6d4b2c727 100644 --- a/base_exception/README.rst +++ b/base_exception/README.rst @@ -11,7 +11,7 @@ Exception Rule !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:bf43c9d6f42f7195b276ef11de74a1a145886fbc5928d55fe35e8763fb5fd866 + !! source digest: sha256:8ed6b8146a4f13987bd621181e7ab8e77db1cf2cc626387b2fe3ffa02cfa64d0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/base_exception/__manifest__.py b/base_exception/__manifest__.py index 54cb35736e0..5c3f6bbfc05 100644 --- a/base_exception/__manifest__.py +++ b/base_exception/__manifest__.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Exception Rule", - "version": "18.0.1.1.2", + "version": "18.0.1.2.0", "development_status": "Mature", "category": "Generic Modules", "summary": """ diff --git a/base_exception/models/base_exception_method.py b/base_exception/models/base_exception_method.py index 9a34abf43be..41b7318a097 100644 --- a/base_exception/models/base_exception_method.py +++ b/base_exception/models/base_exception_method.py @@ -90,9 +90,16 @@ def detect_exceptions(self): # table # and the "to add" part generates one INSERT (with unnest) per rule. raise_exception = False - test_mode = config["test_enable"] and not self.env.context.get( - "test_base_exception" - ) + # The registry is not ready yet when modules are being installed or + # updated: the ongoing transaction holds exclusive locks on the tables + # it has just modified (ALTER TABLE ...), so any query made through a + # second connection would wait forever on those locks (and the locks + # cannot be released, as the current thread is the one waiting). + # Use the current cursor in that case, as already done when running + # tests. + test_mode = ( + config["test_enable"] or not self.env.registry.ready + ) and not self.env.context.get("test_base_exception") # Write exceptions in a new transaction to be committed so that we can # rollback the ongoing one while keeping the exceptions stored with self.env.registry.cursor() as new_cr: diff --git a/base_exception/static/description/index.html b/base_exception/static/description/index.html index 54c84e8ede8..2972df525cd 100644 --- a/base_exception/static/description/index.html +++ b/base_exception/static/description/index.html @@ -372,7 +372,7 @@

Exception Rule

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:bf43c9d6f42f7195b276ef11de74a1a145886fbc5928d55fe35e8763fb5fd866 +!! source digest: sha256:8ed6b8146a4f13987bd621181e7ab8e77db1cf2cc626387b2fe3ffa02cfa64d0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This module provide an abstract model to manage customizable exceptions