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.


call a field from another class in an onchange function

layal abishalhla
on 4/1/14, 11:19 AM 955 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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