Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2982 Näkymät

I created a new model course with a many2many relationship with res.partner (one partner can attend several courses and a course can be made up by several partners). I needed to store the date when a partner joins the course, so I had to create an intermediate model to store it. This model is calledres.partner.course and its columns are partner_id (many2one), course_id (many2one) andjoining_date (date).

Everything is all right, but now, I need to make for each partner a tree view with a column course, which will show all courses (all, not only the ones the partner has joined). And in other column I must show thejoining date (if the partner did not join that course, that column must be empty).

I am trying to do it with fields of type function, but it's very difficult if I take into account that the return of the function must be a dictionary with partner ids as keys and their values must be of a type between char, boolean, int, one2many, many2one, many2many... and not a free dictionary.

I am not an expert on OpenERP, and may be I am trying to manage my target in a wrong way. Anyone knows a better way to manage it?

Thank you in advance.

Avatar
Hylkää