Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
7289 Zobrazení

How do I show the product default code in the "Product" column and product name in the "Description" column? 

http://i.imgur.com/pnoKtxI.png

Avatar
Zrušit
Nejlepší odpověď

Hello Odoo_fa,

You need to do the following:

1. Override the name_get() of product.product model. (So Product column will display code!)

2. Override the onchange trigger of product_id of the purchase.order.line model. (So Description column will display name!)

Hope this helps.

Thanks.

Avatar
Zrušit
Nejlepší odpověď

class puchase_order_line(models.Model):

_inherit='puchase.order.line'

default_code = fields.Char('Internal Reference',related='product_id.product_tmpl_id.default_code')


you add a related field in order line and so you can print or add in a tree view ...

Avatar
Zrušit
Nejlepší odpověď

Hi Serpant,

could you please expalin more I want to show the default_code in account_invoice instead of Product

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
kvě 22
2618
0
čvc 24
1967
1
lis 20
4242
1
říj 20
4842
1
úno 17
4075