server-tools icon indicating copy to clipboard operation
server-tools copied to clipboard

[17.0] Incorrect display of tracked one2many field in chatter (tracking_manager module)

Open melissalateb opened this issue 11 months ago • 3 comments

Module

tracking_manager

Describe the bug

  • When I enable tracking on a one2many field in a custom model using the tracking_manager module, the tracked changes appear in the chatter. However, instead of showing the display name or a meaningful value, the system displays the raw IDs of the records (e.g., Modified: sale.order.linked, 24) in the chatter.

This issue does not occur when tracking one2many fields on standard models like sale.order.line. It seems specific to custom models. Am i missing something?

  • The second thig is when changing a boolean field related (for example here sale.order.linked), it doesn't show both the before and after values; it only displays the new value with the arrow.

To Reproduce

  1. Create a custom model with a One2many field ( in my example : sale.order.linked).
  2. Enable tracking on this field.
  3. Create records with the one2many field.
  4. Modify a boolean related to one2many field save the record.
  5. Observe the chatter for tracked changes.

Image:

Create Image

Write Image

Expected behavior

  • The same think as Order Lines for tracking value.
  • And more details about value changes before and after.

Additional context

Odoo 17.0 enterprise

melissalateb avatar Jan 15 '25 16:01 melissalateb

False might be interpreted as <empty> and therefore an empty string is displayed. Where does the model sale.order.linked comes form? Could it be that this model does not have a display_name attribute? Therefore it displays model+id as fallback?

CRogos avatar Jan 24 '25 17:01 CRogos

I would like to add this finding when activating tracking on "child_ids" in res.partner:

  • Two message are created. One odoo native and a second by tracking_manager.
  • Content of New and Change in the tracking_manager message should be merged.

Image

Maybe we can update the message content of the native message with the more detailed content of the tracking_manager message?

CRogos avatar Apr 02 '25 09:04 CRogos

@CRogos ,

The model sale.order.linked is a custom model that I developed, and it doesn't have a display_name defined. Should I explicitly define one to make the tracking work properly?

melissalateb avatar Apr 02 '25 10:04 melissalateb