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

Many2many field default view_id

By
Miro
on 2/9/16, 10:13 AM 335 views

Hello,

In Odoo 8 is it possible to assign default view to the "Add an item" button?

My idea is opening form instead of tree view  when "Add an item" is clicked.

If i click this button i see POST request

"kwargs":{"view_id":false,"view_type":"search"......}

How to set view_id and view_type ?

0
Miro
On 2/9/16, 10:47 AM

I figured it out. My field was Many2many, i set it's widget to one2many and now it opens a form when i click "Add an item".

<field name="contracts" colspan="2" context="{'default_supplier': id}" widget="one2many">

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: 2/9/16, 10:13 AM
Seen: 335 times
Last updated: 2/9/16, 2:09 PM