I want to add a field in 'line_ids' of bank statement line , but I got error when trying with this code . Any help please ?
Thanks.
class AccountBankStatementLine(models.Model):
_inherit = "account.bank.statement.line"
my_field = fields.Many2one('model.model', string="My field")
<record id="view_bank__inherit" model="ir.ui.view">
<field name="name">bank.statement.inherit</field>
<field name="model">account.bank.statement.line</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook/page[@name='line_ids']/field/tree/field[@name='partner_id']" position="after" >
<field name="my_field" />
</xpath>
</field>
</record>