Odoo Help

Welcome!

This community 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.

0

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

By
Undan
on 10/21/15, 5:43 AM 383 views

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

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

hi,

Please go through this link

https://www.odoo.com/nl_NL/forum/help-1/question/show-tree-view-inside-a-note-book-page-22944

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?

Undan
on 10/21/15, 6:28 AM

friend did you find an answer to your problem

Drees Far
on 11/6/15, 8:02 AM
0
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 ;)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/21/15, 5:43 AM
Seen: 383 times
Last updated: 11/6/15, 6:22 AM