Odoo Help

Welcome!

This community 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.

3

How to combine 2 field become 1 field

By
heru
on 12/16/14, 1:48 AM 429 views

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.

HI, can you please explain your need?

Baiju
on 12/16/14, 3:01 AM
2
heru
On 12/16/14, 4:43 AM

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.

0
Thomas Fossoul
On 12/16/14, 3:47 AM

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

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 12/16/14, 1:48 AM
Seen: 429 times
Last updated: 3/16/15, 8:10 AM