Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4609 Näkymät

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']

 

Avatar
Hylkää
Tekijä

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

Paras vastaus

 //sheet/div/button[1]

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
marrask. 23
1356
0
helmik. 23
1854
3
maalisk. 18
21868
1
maalisk. 15
9081
3
kesäk. 23
4278