Hi,
I would like to know how can I customize the label from many2many_tags please ?
Currently, on the view Episode (listing), I have this on the column Diffusion, and I would like to show the date_diffusion
field from slot_diffusion model, not content_slot.slot_diffusion,x:
content.slot_diffusion,3
content.slot_diffusion,4
# Episode
from odoo import fields, models
class ContentEpisode(models.Model):
_name ="content.episode"
slot_diffusion_ids = fields.One2many(comodel_name="content.slot_diffusion", inverse_name="episode_id")
# Slot diffusion
from odoo import fields, models
class ContentSlotDiffusion(models.Model):
_name ="content.slot_diffusion"
date_diffusion = fields.Datetime(string="Date de diffusion", required=True)
episode_id = fields.Many2one(comodel_name="content.episode")
On the view, I have this:
---
fieldname="slot_diffusion_ids" string="Diffusion" widget="many2many_tags" optional="show"
---
I tried to embed, but I have an error TypeError: Cannot read properties of undefined (reading 'relation'):
---
fieldname="slot_diffusion_ids" string="Diffusion" widget="many2many_tags" optional="show"
tree
fieldname="content.slot_diffusion.slot_diffusion_id" string="date_diffusion"
tree
field
---