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

how can xpath for button type= action 

<button name="%(action_view_account_move_reversal)d" position="replace" states="posted" string="Reverse Entry"  type="action" groups="account.group_account_invoice"/>

I write like this : 

<xpath expr="//button[@name='action_view_account_move_reversal']" position="replace">


but not work


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can try below code,

<record id="view_move_form_inherit" model="ir.ui.view">
<field name="name">account.move</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<button name="%(account.action_view_account_move_reversal)d" position="replace">
</button>
</field>
</record>


Thanks

Ảnh đại diện
Huỷ bỏ