Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
7440 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Melhor resposta

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
Cancelar
Melhor resposta

Hi Serpant,

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

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
mai. 22
2795
0
jul. 24
2083
1
nov. 20
4510
1
out. 20
5095
1
fev. 17
4179