Odoo Help


Display One2many field multiple time in same form

on 8/21/16, 1:30 AM 1,190 views

How to show a One2many field values multiple time in same form in Odoo.

It require to show the same value in multiple tab in a form but with different domain.

Is it  possible to achieve this ? If not what is the best alternative for achieving the same ?

Any thought on this is appreciated ! 

Sudhir Arya (SA)
On 8/21/16, 11:42 AM

Hi Nishad,

It's way simple than you are thinking. You just have to create multiple one2many fields with different field names and add the domain according to your need.

Reference: MRP


draft_lines = fields.One2many('my_obj.obj', 'my_obj_id', domain=[('state', '=', 'draft')], 'Draft Lines')
confirmed_lines = fields.One2many('my_obj.obj', 'my_obj_id', domain=[('state', '=', 'confirm')], 'Confirmed Lines')
cancelled_lines = fields.One2many('my_obj.obj', 'my_obj_id', domain=[('state', '=', 'cancel')], 'Cancelled Lines')

Cool .. This is perfect... Works well

on 8/22/16, 1:54 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/21/16, 1:30 AM
Seen: 1190 times
Last updated: 8/22/16, 1:53 AM