-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[19.0][MIG] auditlog: Migration to 19.0 #3391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Conversation
… ones to make overridding easier
…itlog.log' model (standard 'create_date' field is used instead)
…S.txt file removed
…ail data - if any - are migrated during the installation)
… a field is deleted (e.g. migration)
… 'field_description' fields changed into related fields
Currently translated at 100.0% (87 of 87 strings) Translation: server-tools-17.0/server-tools-17.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auditlog/it/
Currently translated at 100.0% (87 of 87 strings) Translation: server-tools-17.0/server-tools-17.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auditlog/es/
Currently translated at 100.0% (87 of 87 strings) Translation: server-tools-17.0/server-tools-17.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auditlog/sv/
Currently translated at 100.0% (87 of 87 strings) Translation: server-tools-17.0/server-tools-17.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auditlog/zh_CN/
Currently translated at 100.0% (87 of 87 strings) Translation: server-tools-17.0/server-tools-17.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auditlog/es_AR/
When a new auditlog rule is added / modified / deleted, all workers need to be notified of the change. This is done through registry signaling. The previous code was not using the proper level of signaling resulting in workers not being aware of the changes and not implementing the correct auditlog rules, because they had only invalidated their cache and not reloaded the registry. We fix this by using the same signaling as implemented in `base_automation` which sets the the registry_invalidated field of env.registry to True to cause a full registry reload.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-18.0/server-tools-18.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog/
Currently translated at 97.7% (85 of 87 strings) Translation: server-tools-18.0/server-tools-18.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog/tr/
…ecuted by an onchange function
[IMP] auditlog: Add name to action for UX
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-18.0/server-tools-18.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog/
Currently translated at 100.0% (91 of 91 strings) Translation: server-tools-18.0/server-tools-18.0-auditlog Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-auditlog/it/
19601ca
to
715e3aa
Compare
@legalsylvain It seems that the CI pipelines need to include the |
auditlog/models/http_request.py
Outdated
vals = { | ||
"name": httprequest.path, | ||
"root_url": httprequest.url_root, | ||
"user_id": request.uid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger a warning: DeprecationWarning: Since 19.0, use request.env.uid directly
There may be more instances of this, I did not check.
auditlog/models/http_request.py
Outdated
"root_url": httprequest.url_root, | ||
"user_id": request.uid, | ||
"http_session_id": http_session_model.current_http_session(), | ||
"user_context": request.context, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger a warning: DeprecationWarning: Since 19.0, use request.env.context directly
There may be more instances of this, I did not check.
For request, this also applies to request.cr -> request.env.cr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed + added some test scenario's
715e3aa
to
628c510
Compare
628c510
to
acf373c
Compare
Fixed! |
No description provided.