Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/16/14, 6:09 AM|
|Seen: 634 times|
|Last updated: 3/16/15, 8:10 AM|