Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
17793 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Apr. 16
5943
1
Apr. 25
3199
1
Apr. 23
12270
2
Sept. 21
44297
2
Mai 20
5825