I am trying to extend the res.partner model so I can see a list of the 10 most recent tasks that have been 'Done' for a customer on their 'Contact' form. I only want to see the following fields in the list of tasks:
name
date_start
date_end
I believe I need to create a One2many field that links 'res.partner' to 'project.task'.
I have tried the following:
collection_history_1 = fields.One2many(comodel_name='project.task', inverse_name='partner_id')
but when I load and update the module I get the following error:
File "/home/odoo/odoo-server/odoo/fields.py", line 2234, in _setup_regular_full invf = comodel._fields[self.inverse_name] KeyError: 'partner_id'
I obviously have little idea what I'm doing, but I'm hoping someone can point me in the right direction.
Thanks.
Inheritance in model and views: https://goo.gl/fGNfBY
@Sehrish - well, that's actually not very helpful for someone at my level as it doesn't say much at all about one2many field types, which is obviously what I'm struggling with here. This kind of answer is what makes this forum a very frustrating place sometimes. How about writing something that assists me in achieving the goal I described at the top of my question?