+
Skip to content

Conversation

raumschmiede-joshuaL
Copy link

@raumschmiede-joshuaL raumschmiede-joshuaL commented Aug 25, 2025

Hello.

I split up my other PR #3346 to add the new field here.

And I backported a few of your commits that improve the module, @lmignon.

EDIT: Now it is mostly just a backport. My other commits improve the tests a bit.

@mt-software-de

lmignon and others added 6 commits August 25, 2025 10:24
Before this change, the inverse relation from the exception to the records linked to the exception was read to determine if the rule should be added or removed from the rule detected for the current records. On large database with non blocking exceptions this lead to a performance issues since this issues a read of all the SO where the exception has been applied. With this change, we only read the information from the current records
Keeps rule information into cache to avoid to always call the ORM for static informations. This is change allows a boost into the evaluation of exception rules by avoiding useless SQL queries to retrieve rules definitions
Don't call the ORM to filter current recordset. Replace call to the orm by a call to the filtered_domain method.
@OCA-git-bot
Copy link
Contributor

Hi @sebastienbeau, @hparfr,
some modules you are maintaining are being modified, check this out!

@raumschmiede-joshuaL raumschmiede-joshuaL force-pushed the 14.0-reverse-backport-sub-excs branch from 9951c76 to c2a80c0 Compare August 25, 2025 12:03
@raumschmiede-joshuaL
Copy link
Author

FYI @rousseldenis, because you reviewed PR #2670 that introduced the improvements

@raumschmiede-joshuaL raumschmiede-joshuaL force-pushed the 14.0-reverse-backport-sub-excs branch from c2a80c0 to 531597b Compare August 25, 2025 13:10
@mt-software-de
Copy link

Thx. Please also separate this PR into 2. One for the Backport one for your Feature request.

@raumschmiede-joshuaL
Copy link
Author

@mt-software-de, I will create another PR when this here was clarified

Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

LGTM, code review only

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@raumschmiede-joshuaL raumschmiede-joshuaL force-pushed the 14.0-reverse-backport-sub-excs branch from 531597b to b084d3d Compare September 3, 2025 12:20
@raumschmiede-joshuaL
Copy link
Author

raumschmiede-joshuaL commented Sep 3, 2025

Sorry, I changed something again. I moved the new field into the other model. Makes more sense and now the unit tests of sale_exception work without any adjustments

@raumschmiede-joshuaL raumschmiede-joshuaL force-pushed the 14.0-reverse-backport-sub-excs branch from b084d3d to 3c7ff97 Compare September 4, 2025 08:04
@raumschmiede-joshuaL raumschmiede-joshuaL changed the title [14.0][IMP] Backport of 16.0 Improvements & _get_sub_exception_field_names [14.0][IMP] Backport of 16.0 Improvements & Adjusted Tests Sep 4, 2025
@raumschmiede-joshuaL
Copy link
Author

@lmignon and @hparfr, I removed the commit with the new field for now. I want to improve the module to have a better way to handle sub-exceptions.
The new field is probably still needed but somewhere else in the code. I will create a new PR for it later.

But this here can be merged. I will try to not change something again here :D

Copy link

@mt-software-de mt-software-de left a comment

Choose a reason for hiding this comment

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

LGTM.
Could you also create FWP PRs for the newer versions of your refactor commits?

@raumschmiede-joshuaL
Copy link
Author

@hparfr and @lmignon, can you check this here again? Then we can merge it

@hparfr
Copy link
Contributor

hparfr commented Sep 18, 2025

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-3354-by-hparfr-bump-major, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 09011e2 into OCA:14.0 Sep 18, 2025
9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b981245. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载