تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4387 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

You'll find lots of examples in addons folder

Example:-

  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}
الصورة الرمزية
إهمال