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

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

By
Edson Murima
on 3/25/13, 3:34 AM 797 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:
        context={}
          .
          .
          .

    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,
                }
2

Naresh Soni (nch)

--Naresh Soni (nch)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1281
| 2 2 4
India
--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

Thanks,

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

ok thanks for your help

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

1 follower(s)

Stats

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