Skip to content

Conversation

@lembregtse
Copy link
Contributor

No description provided.

sebalix and others added 30 commits September 24, 2025 13:31
…itlog.log' model (standard 'create_date' field is used instead)
…ail data - if any - are migrated during the installation)
… 'field_description' fields changed into related fields
lembregtse and others added 12 commits September 24, 2025 13:31
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/
[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/
@rven
Copy link
Contributor

rven commented Sep 25, 2025

@legalsylvain It seems that the CI pipelines need to include the --with-demo option.
Odoo doesn't install demo by default anymore.

vals = {
"name": httprequest.path,
"root_url": httprequest.url_root,
"user_id": request.uid,
Copy link

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.

"root_url": httprequest.url_root,
"user_id": request.uid,
"http_session_id": http_session_model.current_http_session(),
"user_context": request.context,
Copy link

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

Copy link
Contributor

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

@rven rven force-pushed the 19.0-mig-auditlog branch from 715e3aa to 628c510 Compare October 9, 2025 13:22
@rven rven force-pushed the 19.0-mig-auditlog branch from 628c510 to acf373c Compare October 9, 2025 13:24
@rven
Copy link
Contributor

rven commented Oct 9, 2025

@legalsylvain It seems that the CI pipelines need to include the --with-demo option. Odoo doesn't install demo by default anymore.

Fixed!

@rven rven mentioned this pull request Oct 9, 2025
40 tasks
@sbidoul
Copy link
Member

sbidoul commented Oct 11, 2025

/ocabot migration auditlog

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Oct 11, 2025
Copy link

@DucTruongKomit DucTruongKomit left a comment

Choose a reason for hiding this comment

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

Could you help to solve, so it can be merged, please? @lembregtse
Thank you

return False
httpsession = request.session
if httpsession:
existing_session = self.search(

Choose a reason for hiding this comment

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

I suggest we can use search_fetch which is available in odoo 18 to improve the perfomance.

Comment on lines +47 to +48
if "model_id" in vals:
if not vals["model_id"]:

Choose a reason for hiding this comment

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

Suggested change
if "model_id" in vals:
if not vals["model_id"]:
if "model_id" in vals and not vals["model_id"]:

_description = "Auditlog - Log details (fields updated)"

field_id = fields.Many2one(
"ir.model.fields", ondelete="set null", string="Field", index=True

Choose a reason for hiding this comment

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

Suggested change
"ir.model.fields", ondelete="set null", string="Field", index=True
"ir.model.fields", ondelete="set null", index=True

"ir.model.fields", ondelete="set null", string="Field", index=True
)
log_id = fields.Many2one(
"auditlog.log", string="Log", ondelete="cascade", index=True

Choose a reason for hiding this comment

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

Suggested change
"auditlog.log", string="Log", ondelete="cascade", index=True
"auditlog.log", ondelete="cascade", index=True

Comment on lines +98 to +99
if "field_id" in vals:
if not vals["field_id"]:

Choose a reason for hiding this comment

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

Suggested change
if "field_id" in vals:
if not vals["field_id"]:
if "field_id" in vals and not vals["field_id"]:

deadline = datetime.now() - timedelta(days=days)
data_models = ("auditlog.log", "auditlog.http.request", "auditlog.http.session")
for data_model in data_models:
records = self.env[data_model].search(

Choose a reason for hiding this comment

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

the same comment above using search_fetch

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Can you rebase? There has been quite some changes in this module during and after the OCA days this year.
Also, if you are interested in this module, maybe you would like to review of some of the other (unmerged) recent PRs against this module.

@adnankkapasi
Copy link

@lembregtse Could you please do the needful, so that this PR gets merged?
Thanks in advance

@adnankkapasi
Copy link

@lembregtse Could you please do the needful, so that this PR gets merged? Thanks in advance

@lembregtse Any update?

@StefanRijnhart
Copy link
Member

StefanRijnhart commented Jan 2, 2026

Given that my recent changes in auditlog (not yet included here) are meddling with Odoo cache internals, which have been refactored completely in Odoo 19, I will be having a go at this one in the next couple of days.

@StefanRijnhart
Copy link
Member

Superseded by #3483

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.