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 add a button in a one2many tree view

By
oumaima
on 6/24/13, 10:00 AM 3,057 views

Hi everyone i'm triying to add a button in a one2many view but i can't show it

my file.xml

  <group>
                               <field name="cost_ids"  nolabel="1" colspan="4" >
                                    <tree version="7.0" editable="bottom">
                                        <field name="mat" string="Matiere" />
                                      <field name="teacher_ids" string="Professeurs" domain="[('job_id.name','=','prof')]"/>
                                          <field name="coef_mat" string="Coefficient" />
                                          <field name="charg_hor" string="Charge Horaires" />

            <button name="return_action_to_open" type="object" context="{'xml_id':'action_school_unit_form'}" string="unites deval" help="Afficher le bulletin de letudiant" />

                                    </tree>
                               </field>
                            </group>
1

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 7/21/14, 5:49 AM

Hi..

In Tree View, if you are defining a button, then define it with an icon.. because button will not be shown instead icon for the same will be shown in the Tree View...

So In your case,

<button name="return_action_to_open" icon="gtk-ok" ... />

Note: numerous icons are available, same can be used while defining buton..

0

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 7/21/14, 3:29 AM

I would try to define a new security group (or use existing one) and add to button definition groups=selected.group ...
 

0
dirtyHandsPHP
On 7/21/14, 2:44 AM

I am facing the same problem?? Any solution?

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: 6/24/13, 10:00 AM
Seen: 3057 times
Last updated: 3/16/15, 8:10 AM