Odoo Help

Welcome!

This community 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.

1

Is it posible to return a custom dictionary to a function field in OpenERP7?

By
Juan Formoso
on 10/16/14, 6:09 AM 418 views

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/16/14, 6:09 AM
Seen: 418 times
Last updated: 3/16/15, 8:10 AM