Odoo Help


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.


2 questions about button

willie ho
on 11/12/14, 4:52 AM 451 views

I want to create a button to call a wizard

1 How can I put it on the top of the tree view?

I tried: <field name="default_code" position="before">
                        <button name="%(split_into)d" string="Testing" type="action"/>

but then the button repeat every line but not on the top 

2 Can I press a button to popup a screen when creating a record without saving the record?

I put the button inside the form but when I click it, the record will be saved before popup a new screen.

Can I popup a new screen without doing any action to the form?

Please post all the relevant code.

René Schuster
on 11/12/14, 6:59 AM

Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
On 11/12/14, 7:33 AM

1. I think you mean in the "more" options? If you do, try using the action record in the XML view pointing to your wizard. The model element in your <action> will be the reference to which object it will be attached to. For example: <field name="model">account.invoice</field> will put your action on the More button above the invoice tree view.

2. In the same action, use the element "target" and set its value to new. This will allow your wizard to open in a pop-up alike screen without alterting the form view. This can even be done in the tree view.



| 5 3 6
Jakarta, Indonesia
On 11/12/14, 6:54 AM

Willie,  1. You cannot put the button inside a tree view and only shown on the top without changing the view framework.  What you can do is to put it outside of the tree view (the 2many field). 2. Sorry, I'm not knowledgable enough to answer this.

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

2 follower(s)


Asked: 11/12/14, 4:52 AM
Seen: 451 times
Last updated: 3/16/15, 8:10 AM