Odoo Help


Problem to display a form view from an "on_change" method

Edson Murima
on 3/25/13, 3:34 AM 1,134 views

Hello... I'am trying to display a form view from an "on_change" method and a need your help to have your help for this......

def on_change_credito(self,cr,uid,ids,debito,credito,reflexao_centro,conta_origem_id,context=None):
    if context is None:

    return {
                'type': 'ir.actions.act_window',
                'name': 'Lancamentos',
                'view_mode': 'form',
                'view_type': 'form',
                'res_model': 'dotcom.lancamento.movimento.custo',
                'target': 'new',
                'context': context,
                'nodestroy': True,

Naresh Soni (nch)

--Naresh Soni (nch)--
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 3/25/13, 3:42 AM

Hello Edson,

You cannot return a view action from an on_change return. You can only return a dictionary having keys either of values, domain, warning or empty dictionary({}).for more information refer: on_change


Edson Murima
On 3/25/13, 6:31 AM

ok thanks for your help

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

1 follower(s)


Asked: 3/25/13, 3:34 AM
Seen: 1134 times
Last updated: 3/16/15, 8:10 AM