Hello. I am creating a new module where I will inherit the tree view and form view from the account.invoice module.
So far I've found a lot of examples on how to inherit a form view. As far as i know I should be fine if I edit the my module's view.xml file and just do the following:
<record model="ir.ui.view" id="mymodule.list">
<field name="name">mymodule list</field>
<field name="model">mymodule.mymodule</field>
<field name="inherit_id" ref="account.invoice_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<tree create="false" edit="false">
<field name="partner_id" groups="base.group_user" string="Customer"/>
<field name="date_invoice"/>
<field name="number"/>
...
</tree>
</field>
</record>
(I would do the same for the form view but with ref="account.invoice_form")
But when i try to do the tree view i get 2 errors.
1 of them regarding the create and delete records
Element '<tree create="false" edit="false">' cannot be located in parent view
The other one asking for partner_id (this one pops up when i delete "create=false" "edit=false" on the tree tag)
Field `partner_id` does not exist
The big picture in here is that. I want to extend fields on account.invoice (1 boolean and the other one string)
Then show the exact same account.invoice tree view on a custom module with the only difference that in this inherited custom tree view I will show those accounts with the boolean set on "true". So what I need right now is to inherit the account.invoice tree and form view, into my custom module.