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.

0

Add custom data in session context - Project Management

By
Renemari Padillo
on 3/27/16, 11:07 PM 397 views

everyone.

Is it possible to add custom data in to the session context?

See my sample [code](https://gist.github.com/renesansz/2642b02875475383605e) for reference.

What I wanted to happen is that, I wanted to access the instance of the current project, so that I could access its other properties.

By default, Odoo always appends the id of the current/selected project through `active_id` and then you can directly access it in to the XML view. However, aside from the current project id, I wanted to get its other properties (`current_sprint` in my sample code) and put it in to the context of `<record id="project.act_project_project_2_project_task_all" model="ir.actions.act_window">`. Because what I wanted to happen is that I wanted to filter the tasks automatically by `current_sprint`.

Are there any other ways that I could access the current project instance?

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: 3/27/16, 11:07 PM
Seen: 397 times
Last updated: 3/28/16, 1:58 AM