Odoo Help


2 questions about button

willie ho
on 11/12/14, 4:52 AM 694 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 - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
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.

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

2 follower(s)


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