Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
17807 มุมมอง

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>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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..

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello, Everyone, you can add button in the one2many tree view.

this button will not be disabled

add button in sale orders line. 


<xpath expr="//field[@name='product_id']" position="after">
<button name="%(action_search_hotel_wizard)d" string="Search" type="action" icon="terp-gtk-jump-to-ltr" />
</xpath>

I think this will help you to add button in the one2many tree view without disabling button.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I am facing the same problem?? Any solution?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 16
7497
0
มี.ค. 15
3746
0
ก.ย. 24
296
1
มี.ค. 23
2403
1
เม.ย. 22
3250