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.

0

show a field in a view from another object

By
daouda
on 5/17/13, 12:33 PM 876 views

hi guys, I want to show a field in the res.partner form view but the field is in another object. How can i do to show it in that view? Thanks a lot for your answers

0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/17/13, 12:37 PM

Hi,

You must define a field type function in res.partner. and in this function get information in another object.

def _get_other(self,cr,uid,ids,field,arg,context=None):       
       res={}
       //your treatment
       return res

_columns = {
          'other': fields.function(_get_other, method=True, type='float',string='Info other'),
          }

Thank You.

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)

Stats

Asked: 5/17/13, 12:33 PM
Seen: 876 times
Last updated: 3/16/15, 8:10 AM