Odoo Help


call a field from another class in an onchange function

layal abishalhla
on 4/1/14, 11:19 AM 1,065 views

in an onchange function i need to call a field(in order to get its value) from another class . any help please ?



| 5 4 7
Bikaner, India

OpenERP Devloper at SunARC Technology

On 4/1/14, 11:45 AM

You'll find lots of examples in addons folder


  def onchange_partner_id(self, cr, uid, ids, part, context=None):
        part = self.pool.get('res.partner').browse(cr, uid, part, context=context)
        user = part.user_id and part.user_id.id or uid
        val = {
          'user_id': user
        return {'value': val}

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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/1/14, 11:19 AM
Seen: 1065 times
Last updated: 3/16/15, 8:10 AM