Skip to Content
Menu
This question has been flagged
1 Reply
1427 Views

Hello :) 

I want to inherit the invoices form view in the accounting module to add the attribute "edit_multi"

But the view displayed is view_out_invoice_tree which only contains an xpath to add the attribute banner so i didn't know how to inherit it

I couldn't inherit the  view_out_invoice_tree because i couldn't find a way to inherit it

I tried to define a new tree view :

where i added the attribute banner and my attribute edit_multi

and override the  action_move_out_invoice_type by rewriting it in my custom module with id = account. action_move_out_invoice_type  and changed the ref on the field  view_ref to my custom view but this didn't work

Any ideas please  ?

Thank you very much.

Avatar
Discard
Best Answer

Hi,

Try this code:

Thanks

Avatar
Discard

<record id="view_out_invoice_tree" model="ir.ui.view">
<field name="name">account.out.invoice.tree</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="multi_edit">1</attribute>
</xpath>
</field>
</record>