Odoo Help

0

Show field values instead of default drop down many2one

By
Wiebe de Roos
on 8/6/13, 11:22 AM 786 views

Hi all,

I would like to show the fields of product template from witin a sale_order_line.

More specific I want to show the description of the product_template for each order line.

I have these fields in my view:

<field name="x_product_template_id"/>

This field was added to sale_order_line via:

#table 'sale_order_line' (extended with fields we need) class sale_order_line(osv.osv): _name = 'sale.order.line' _inherit = 'sale.order.line' rec_name = 'name_template' _columns = { 'x_product_template_id': fields.many2one('product.template', 'Product template', required=False), } sale_order_line()

However: it still shows me a drop down with the products (the default fields) instead of the product template values...

How can I change my code to show for example the description of the product_template? I haven't got a clue about the right approach.

Thanks in advance, hope question is clear...

Wiebe

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.

Register

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

0 follower(s)

Stats

Asked: 8/6/13, 11:22 AM
Seen: 786 times
Last updated: 3/16/15, 8:10 AM