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
Search and Display Multiple Fields on Product Many2one (Quotation, SO, PO MO etc) Field
This module allows you to search and display multiple fields in the Product Many2one field across all Odoo screens - such as quotations, sale orders, purchase orders, invoices, and more.
https://www.youtube.com/watch?v=fF_U28ey0NU