Ajuda

0

How to delete/remove the duplicated record in many2one tree view? (Odoo 13)

Avatar
khanhqn

Hello,

I have 3 models.

Model_a.py:

fila = fields.one2many('model.c', 'keya')

 

Model_b.py:

filb = fields.one2many('model.c', 'keyb')

reference = fields.Char('Reference')

date = fields.Date('Date')


Model_c.py:

keyb = fields.many2one('model.b')

keya = fields.many2one('model.a')


I will put the same values from fields: 'reference' and 'date' into the one2many tree view fila and filb.

It also generates in many2one tree view of model_c.py two records with the same values or my many2one tree view have duplicated record.

So how to delete/remove duplicated records in many2one tree view of model_c.py?


Please help!

Thank you!

Avatar
Descartar