Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
17809 Представления

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?

Аватар
Отменить
Лучший ответ

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,}">

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 16
5948
1
апр. 25
3225
1
апр. 23
12283
2
сент. 21
44306
2
мая 20
5835