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.


Show different data in many2one

Francesco OpenCode
on 5/16/13, 6:37 AM 1,266 views

I've a class with two many2one that point to the some class relation. I need to show the data in the many2one in two different way. Example: my many2one fields relation is res.partner.I need to show tha partner name in the first m2o and city-state in the second one. It's possibile?

I can't use name_get because it work on all the class relations.


Naresh Soni (nch)

--Naresh Soni (nch)--
Tiny ERP Pvt Ltd
| 2 2 4
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 5/16/13, 6:57 AM

Hi Francesco,

Set a context on either of the field eg:{'show_city_state':True} and look for the context in the name_get if you have this key then return city_state else return name.


On 5/16/13, 9:28 AM

Please can anyoune help me! i just want to know if it's possible to add field.many2one('my.model') in class which inherit res.partner knowing that 'my.model' contain field.many2one('product.product'). i(m using version 7 of openerp

Open a new post, please! Don't spam in other post.

Francesco OpenCode
on 5/16/13, 11:23 AM

sorry! but just I'm looking for an answer

on 5/16/13, 11:30 AM

I know it but you can't post your problem in post of other users. Open a new post and wait someone help you.

Francesco OpenCode
on 5/16/13, 11:33 AM

OK Francesco!! SORRY FOR THAT!

on 5/16/13, 11:36 AM

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

0 follower(s)


Asked: 5/16/13, 6:37 AM
Seen: 1266 times
Last updated: 3/16/15, 8:10 AM