Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4600 Lượt xem

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

 

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

 //sheet/div/button[1]

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 23
1338
0
thg 2 23
1834
3
thg 3 18
21859
1
thg 3 15
9054
3
thg 6 23
4241