Odoo Help


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.

On 7/17/14, 6:20 AM

try name_get override

Moahmed Richi
On 9/4/15, 7:35 AM

_columns = {

'name': fields.function(_combine, type='char',arg=('model1_id.name','model2_id.name'), method=True ,string=" "),

'model1_id':fields.many2one('model1.model1',' '),

'model2_id':fields.many2one('model2.model2',' '),


def _combine(self, cr, uid, ids, field_name, args, context=None):

values = {}

for id in ids:

rec = self.browse(cr, uid, [id], context=context)[0]

values[id] = {}

values[id] = '%s -- %s' % (rec.model1_id.name, rec.model2_id.name)

return values

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

1 follower(s)


Asked: 7/17/14, 5:59 AM
Seen: 684 times
Last updated: 9/4/15, 11:17 AM