Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4633 Представления

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]

Лучший ответ

 //sheet/div/button[1]

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
нояб. 23
1369
0
февр. 23
1870
3
мар. 18
21921
1
мар. 15
9108
3
июн. 23
4342