Hi,
Is it possible to create server action only for specific views? Like the server action should only be shown in form view and not in list view?
Thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
Is it possible to create server action only for specific views? Like the server action should only be shown in form view and not in list view?
Thanks in advance.
Hi,In the server action you can specify the view type in binding_view_types.Here's an example for you to check
<record model="ir.actions.server" id="download_contact">
<field name="name">Download (vCard)</field>
<field name="model_id" ref="model_res_partner"/>
<field name="binding_model_id" ref="model_res_partner"/>
<field name="binding_view_types">
<field name="state">code</field>
<field name="code">
action = {
'type': 'ir.actions.act_url',
'url': '/web_enterprise/partner/%d/
'target': 'self',
}
</field>
</record>
Hope it helps
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
2
сент. 25
|
1732 | |||
|
2
окт. 23
|
6035 | |||
|
5
сент. 25
|
24630 | |||
|
3
авг. 25
|
3758 | |||
|
1
мая 25
|
3661 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.