Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
17685 Vistas

I can pass context for smart buttons like this and the action will receive the context:

         
<button class="oe_inline oe_stat_button" type="action" 
         name="%(action_view_issues_of_task)d"
context="{'search_default_task_id': [active_id], 'default_task_id': active_id, 'default_project_id': project_id or False, 'default_partner_id': partner_id or False,}"
icon="fa-bug">
<field
string="Issues" name="issue_count" widget="statinfo"/>
</button>


but i could not find a way to pass the context to the related action in a kanban view link or button:


<a style="margin-right: 10px" name="%(action_view_issues_of_task)d" type="action" context="{'search_default_task_id': [active_id], 'default_task_id': active_id, 'default_project_id': project_id or False, 'default_partner_id': partner_id or False,}">

    <t t-raw="record.issue_count.raw_value"/> Issues

</a>


Is it possible to pass the context in a kanban view link or button?

Avatar
Descartar
Mejor respuesta

You can t-attf-data-context

Example:

<a style="margin-right: 10px" name="%(action_view_issues_of_task)d" type="action" t-attf-data-context="{'search_default_task_id': [active_id], 'default_task_id': active_id, 'default_project_id': project_id or False, 'default_partner_id': partner_id or False,}">

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 16
5846
1
abr 25
3081
1
abr 23
12124
2
sept 21
44097
2
may 20
5736