Skip to content

Fork Sync Branch 18.0 - #218

Merged
btl-bot merged 6 commits into
BTLzdravtech:18.0from
OCA:18.0
Sep 10, 2026
Merged

btl-bot merged 6 commits into
BTLzdravtech:18.0from
OCA:18.0

Conversation

@btl-bot

@btl-bot btl-bot commented Sep 10, 2026

Copy link
Copy Markdown

No description provided.

grindtildeath and others added 6 commits September 1, 2026 14:36
This aims to solve issues when modules not depending on whatever
implementation of base_exception, override the same function that
triggers the detection of exceptions.

Before this commit, any changes done in such overrides could end
up being committed to the database if the MRO did execute such
function before the function implementing base_exception that avoids
to call super in case an exception is detected. (eg sale.order.
action_confirm in sale_exception)

With this commit, in case there is any newly detected exception,
or a record with exception that is not ignored, or a blocking
exception linked to a record, exception changes will be committed
in DB while a specific Exception type will be raised to rollback
any changes done in the ongoing transaction. Such an exception
will be handled in the UI to refresh the exception_ids field
so that the user knows why the action was not completed.
With the previous change raising an exception to rollback a
transaction, the function `_popup_exceptions` could not be called
anymore while the error was raised.

Instead, we provide now a hook `_must_popup_exception` that can be
redefined by model and will be called when `action_popup_exception`
is called by the webclient, to smoothly refresh the page and
display the popup exception wizard.
Simplify the JS layer by leveraging client actions.

Return a custom client action whenever the BaseExceptionError
is catched on RPC call and handle everything through the call
to action_popup_exceptions:
- In case exception should not pop up, return a soft reload client
action instead of handling the refresh manually in JS
- In case exception should pop up, return the wizard action, but
do a soft reload first to display the exception_ids block before
execution the wizard opening action.
Make test decorator available for import in other modules

Avoid using new env for unrelated tests
Signed-off-by simahawk

@sireko sireko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved

@btl-bot
btl-bot merged commit 9d7ea15 into BTLzdravtech:18.0 Sep 10, 2026
3 of 4 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 83.16832% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
base_exception/models/base_exception.py 20.00% 8 Missing ⚠️
base_exception/tests/common.py 84.61% 4 Missing ⚠️
base_exception/tests/purchase_test.py 25.00% 3 Missing ⚠️
base_exception/models/base_exception_method.py 92.00% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
base_exception/exceptions.py 100.00% <100.00%> (ø)
base_exception/tests/test_base_exception.py 67.79% <100.00%> (-32.21%) ⬇️
base_exception/models/base_exception_method.py 80.61% <92.00%> (-14.26%) ⬇️
base_exception/tests/purchase_test.py 84.84% <25.00%> (-10.32%) ⬇️
base_exception/tests/common.py 84.61% <84.61%> (ø)
base_exception/models/base_exception.py 60.00% <20.00%> (-26.67%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants