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?