Community mailing list archives
RE: Display product default_code on pricelist item viewby
You got it. Thanks a lot.
Centre d'Enseignement et de Recherche en Informatique, Université d'Avignon et des Pays de Vaucluse
I think the default_code does not show in your list view because the value is kept in product_template (not in product_product) and you probably have chosen product template instead of product variant for the pricelist.
Maybe you could try something similar to this https://github.com/odoo/odoo/blob/9.0/addons/product/product_view.xml#L370 if you’d like to show default_code for product template?
From: Aurélien Rivet [mailto:firstname.lastname@example.org]
Sent: Wednesday, March 30, 2016 8:11 PM
To: Community <email@example.com>
Subject: Display product default_code on pricelist item view
Hello, I don't know if this is the right place to ask a question about
Odoo development but I try.
On the product.pricelist.version view there is a list of items. Items
have one2Many fields to product.template and product.product.
What I want is to display the default_code of the product on the tree
view (product.product_pricelist_item_tree_view) because by default only
the name is displayed. How can I achieve that ? I already tried to
override name_get but it doesnt seem to be called there. I also tried to
nest fields in views. But without success.
Hope someone can help.