Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
4324 Prikazi

Hi, i'm Heru ...

I'm from Indonesia,

I was the first use odoo .

i want a question , 

How combine 2 field become 1 field in another form ?

thanks.

Avatar
Opusti

HI, can you please explain your need?

Avtor Best Answer

Baiju, and Thomas, thanks for your respon ...
but, it works, with add method name_get

code name_get :

def name_get(self, cr, uid, ids, context=None):
        if context is None:
            context = {}
        res = []
        for record in self.browse(cr, uid, ids, context=context):
            tit = "[%s] %s" % (record.name, record.ket)
            res.append((record.id, tit))
        return res

I hope, if I have difficult, you can help me ...
hehe.

Avatar
Opusti
Best Answer

You can create a new function field which concatenate the 2 others.

In the new api i think you have to add the compute attribute to a new field which will also concatenate the 2 others. 

Here is the new api docs :http://odoo-new-api-guide-line.readthedocs.org/en/latest/fields.html#field-types

 

Avatar
Opusti