Community mailing list archives

community@mail.odoo.com

RE: Display product default_code on pricelist item view

by
Aurélien Rivet
- 03/31/2016 06:48:07

You got it. Thanks a lot.

Aurélien Rivet,
M2 Informatique,
Centre d'Enseignement et de Recherche en Informatique, Université d'Avignon et des Pays de Vaucluse




On Wed, Mar 30, 2016 at 6:48 PM -0700, "Yoshi Tashiro" <tashiro@roomsfor.hk> wrote:

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?

 

---

Yoshi Tashiro

 

From: Aurélien Rivet [mailto:aurelienrivet@hotmail.fr]
Sent: Wednesday, March 30, 2016 8:11 PM
To: Community <community@mail.odoo.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.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe