[17.0][IMP] Add bulk subscribe actions for auditlog rules#3443
Open
[17.0][IMP] Add bulk subscribe actions for auditlog rules#3443
Conversation
drkpkg
commented
Nov 7, 2025
- Add server actions to trigger subscribe/unsubscribe from list view
- Ensure return type suits server action flow
- Support bulk handling without interfering with form buttons
- add server actions to trigger subscribe/unsubscribe from list view - ensure return type suits server action flow - support bulk handling without interfering with form buttons
- Removed the Odoo Community banner image from README. - Corrected spelling of "license" to "licence" in badge link. - Updated HTML title to "Audit Log" for better clarity. - Changed section headings from <h2> to <h1> for improved structure in HTML documentation. - Ensured proper formatting and consistency across documentation files.
- Introduced a new test class for bulk subscribe and unsubscribe actions. - Implemented tests to verify the correct behavior of bulk subscription and unsubscription for audit log rules. - Ensured that the state of rules is correctly updated after bulk actions.
Author
|
@StefanRijnhart after the rebase from #3432 this feature is the only left. |
Member
There was a problem hiding this comment.
Thanks for the rebase!
Points of order:
- Next time, maybe keep the original PR, updating the title manually.
[FEAT]does not conform to Odoo commit message prefixes (https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#tag-and-module-name), suggest[IMP].- Please add the module name in the commit message, like
[IMP] auditlog: add bulk subsccribe actions for rules. - Please squash commits into one as they are intimately related.
Code review:
- Returning another action with soft-reload is not necessary. Odoo will already update the rules statuses without it. That means we can avoid adding the new methods as you can just call the existing subscribe/unsubcribe ones.
- The original subscribe method is not reentrant. It will happily create duplicate window actions to set as the rule's
action_id. Given that the UI now allows to callsubscribeon subscribed records, can you fix this?
- Updated the bulk subscribe method to only subscribe rules that are not already subscribed. - Modified the bulk unsubscribe method to only unsubscribe rules that are currently subscribed. - Changed return values to True for better integration with server action flow.
- Added cleanup logic in setUpClass to remove existing rules before creating new ones. - Implemented tearDownClass to ensure proper unsubscription and deletion of rules after tests. - Improved test setup for bulk subscribe/unsubscribe actions to maintain a clean state.
- Changed assertions in bulk subscribe and unsubscribe tests to check for truthy return values instead of specific action results. - Ensured that the state of rules is validated after performing bulk actions, maintaining consistency in test outcomes.
- Removed conditional check for existing rules before unsubscribing and unlinking. - Ensured that cleanup actions are always executed to maintain test integrity.
StefanRijnhart
requested changes
Dec 7, 2025
Member
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thanks for the update! Remaining points:
- Please squash commits into one as they are intimately related.
- Don't add additional methods but make original methods reentrant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.