Skip to content

Conversation

@CRogos
Copy link
Contributor

@CRogos CRogos commented Nov 24, 2025

image

Prevent error when tracking fields of type property. (e.g. lead_properties)

2025-11-24 12:36:53,697 2 ERROR db18_test_tracking_manager_domain odoo.http: Exception during request handling. 
Traceback (most recent call last):
  File "/src/odoo/odoo/http.py", line 2576, in __call__
    response = request._serve_db()
               ^^^^^^^^^^^^^^^^^^^
  File "/src/odoo/odoo/http.py", line 2103, in _serve_db
    return self._transactioning(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/src/odoo/odoo/http.py", line 2166, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/src/odoo/odoo/service/model.py", line 158, in retrying
    env.cr.flush()  # submit the changes to the database
    ^^^^^^^^^^^^^^
  File "/src/odoo/odoo/sql_db.py", line 160, in flush
    self.precommit.run()
  File "/src/odoo/odoo/tools/misc.py", line 1162, in run
    func()
  File "/src/odoo/addons/mail/models/mail_thread.py", line 548, in _track_finalize
    tracking = records.with_context(context)._message_track(fnames, initial_values)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/src/odoo/addons/mail/models/mail_thread.py", line 630, in _message_track
    tracking[record.id] = record._mail_track(tracked_fields, initial_values_dict[record.id])
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/src/user/modules/oca/server-tools/tracking_manager_domain/models/models.py", line 67, in _mail_track
    tracking_value_id[2]["field_id"] for tracking_value_id in tracking_value_ids
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'field_id'

Copy link

@MohamedOsman7 MohamedOsman7 left a comment

Choose a reason for hiding this comment

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

LGTM

@CRogos
Copy link
Contributor Author

CRogos commented Dec 5, 2025

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-3452-by-CRogos-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 5, 2025
Signed-off-by CRogos
@OCA-git-bot
Copy link
Contributor

@CRogos your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-3452-by-CRogos-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@CRogos
Copy link
Contributor Author

CRogos commented Dec 5, 2025

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-3452-by-CRogos-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4c291e8 into OCA:18.0 Dec 5, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@CRogos CRogos deleted the 18.0-ticket-1375 branch December 8, 2025 15:05
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.

3 participants