Odoo Ajuda

0

0
2 Respostas
1
GiusyG Itália
13/09/19 03:03

Hello,

you have to override the "name_get" and replace the fields you need to have the unique "code".

-1
pepe44 Polônia
13/09/19 03:12

@GiusyG Any sample code? Where can i find "name_get"? More details please. I'm not specialist in odoo :)

6 Comentários
GiusyG Itália
13/09/19 03:22

@api.multi

def name_get(self):

# Prefetch the fields used by the `name_get`, so `browse` doesn't fetch other fields

self.read(['name', 'default_code'])

return [(template.id, '%s%s' % (template.default_code and '[%s] ' % template.default_code or '', template.name))

for template in self]

pepe44 Polônia
13/09/19 03:30

Should i this method override as model product.product?

GiusyG Itália
13/09/19 03:32

it shows you the name of the product in sale.order.line in the desired format.

GiusyG Itália
13/09/19 03:33

Please rate my answer if I have been of help to you ..

pepe44 Polônia
13/09/19 03:49

But should i do this in which model? If you help me i rate your answear.

GiusyG Itália
13/09/19 03:51

_inherit = 'product.product'

Faça uma Pergunta
Writer
Marcadores
Keep Informed
1 seguidor (es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now