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 can I hide a <button ?

By
wizardz
on 7/12/16, 4:26 AM 194 views

I try to hide a button with this:

<record id="hr_timesheet_sheet_form_inv_1" model="ir.ui.view">

<field name="name">hr.timesheet.sheet.form_inv_1</field>

<field name="model">hr_timesheet_sheet.sheet</field>

<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>

<field name="arch" type="xml">

<xpath expr="//button[@name='647']" position="attributes">

<attribute name="invisible">True</attribute>

</xpath>

</field>

</record>

my problem is, that I have to give it the actionnumber.

How can I make this dynamic, so I don't need the actionnumber. When I use this module in a other odoo installation they have an other number there and so the module doesn't know what button to hide. [@name='647']

 

I found a way, : //sheet/div/button[1]

wizardz
on 7/12/16, 5:08 AM
0
Hamza Tahboub
On 7/13/16, 7:28 AM

 //sheet/div/button[1]

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: 7/12/16, 4:26 AM
Seen: 194 times
Last updated: 7/13/16, 7:28 AM