Hey i have duplicated purchase order module and now i am adding field only to that duplicated view. I am able to add fields in the header part but when i try to add field in the line view it gives error like
'field partner does not exist'
Can you tell how i am suppose to do that
class PurchaseInvestment(models.Model):
_name = 'purchase.investment'
_inherit = 'purchase.order'
partner = fields.Many2one('res.partner', string='Investor')
This is my py file and here is my xml
<record model="ir.ui.view" id="tata_mod_pr_investment">
<field name="name">Purchase Order Investment</field>
<field name="model">purchase.investment</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page[1]/field/tree" position="inside">
<field name="partner"/>
</xpath>
</field>
</record>