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

Create new project from template in Kanban view

By
riess82
on 7/15/14, 4:34 AM 1,488 views

I would like to be able to create a new project from a template directly in Kanban view. The button in form view is this:

<button string="New Project Based on Template" name="duplicate_template"  type="object" states="template" context="{'parent_id':parent_id}" class="oe_highlight" groups="base.group_user"/>

I inherited the kanban view and can put the button in there, but I can't figure out how to insert the context parent_id correctly?

I googled a lot, looked at the code inside openerp but found no example. I am stuck at

<button string="New Project Based on Template" name="duplicate_template" states="template" type="object" t-att-context="{'parent_id' : record.parent_id.raw_value}" class="oe_highlight" groups="base.group_user" ><span>Create new Project</span></button>

which creates a new project, but without the parent_id set.

How can I define the context in there?

0
Michael Karrer
On 4/9/15, 10:43 AM

Same for me - it seems that there is no way to pass context in a kanban view to the called action :(


I did ask more or less the same question here: https://www.odoo.com/forum/help-1/question/how-to-pass-context-to-a-called-action-with-kanban-view-links-or-buttons-83722

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: 7/15/14, 4:34 AM
Seen: 1488 times
Last updated: 4/9/15, 10:43 AM