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

Show field values instead of default drop down many2one

By
Wiebe de Roos
on 8/6/13, 11:22 AM 685 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

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

0 follower(s)

Stats

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