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

How to return different one2many forms based on parent setting

By
todd
on 4/10/13, 12:42 PM 1,030 views

Hello,

Is the following possible?

My parent object has a boolean, depending on the setting of the boolean will determine which view needs to opened.

If bool is true open form a, else form b.

I'd looked at the following: The chapter Specify the views you want to use in the Developer Book.

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 4/10/13, 2:02 PM

Hello todd,

What you say is not possible. But what OpenERP Says in the book The chapter Specify the views you want to use in the Developer Book. is possible. That this means that if you have a child table linked with your parent table and your child table has many views defined say for eg: form view 1 and form view 2 then you can specify which form view you want to open by passing a key *_view_ref:XML_VIEW_ID here * is either of form/tree/search etc. So OpenERP will open this view when requested. Pass this parameter on the field's context.

Eg:{'form_view_ref:'form_view_1'}

Thanks,

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)

Stats

Asked: 4/10/13, 12:42 PM
Seen: 1030 times
Last updated: 3/16/15, 8:10 AM