Odoo Help


How to display, A Tree view (which is able to add new lines) inside a notebook page?

on 10/21/15, 5:43 AM 881 views

Is there any way to use one2many field without declaring it in a class? I

Deepak Krishna
On 10/21/15, 6:19 AM


Please go through this link


Thank you for responding,it is not clear and what i want to know is whether we can use a one2many field without declaring it in a specified class?

on 10/21/15, 6:28 AM

friend did you find an answer to your problem

Vale Trood
on 11/6/15, 8:02 AM
Dr Obx
On 10/21/15, 6:31 AM

#--------------- Class 2----------------

class class2(models.Model):

_name = 'class2'

_description = 'Class 2'

item_order_line = fields.Many2one('class1','Item')

item_id = fields.Char('Item Number')

item_title = fields.Char('Item Title')

quantity_ordered = fields.Integer('Quantity')

sale_price = fields.Char('Sale Price')

#----------------- Class 1 -----------------

class class1(models.Model):

_name = 'class1'

_description = 'Class 1'

_inherit = ['class2']

#------------------ o2m -----------------

order_line = fields.One2many('class2','item_order_line',string='Order Lines')

Example ;)

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: 10/21/15, 5:43 AM
Seen: 881 times
Last updated: 11/6/15, 6:22 AM