Is there a way to execute an action from a link in a form view? I'm displaying a table in a Html filed and I'd liked to have a link for table record that opens a window action target new.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hy, Sorry I am late.
One option is through like this, just create a link like
<a class="btn btn-primary" t-att-href="'/web#menu_id=%s&action=%s&id=%s&view_type=form&model=your_model' % (%(addon.menu_id)d, %(addon.action_id)d, your_res_id, )">Go to backend</a>
This will redirect to back- end. This is an example. DO changes accordingly.
thanks!
only one question... to open it as a popup or with breadcrumbs from previous view I need a new custom action or is there a parameter to set?
While defining the action in XML, you can use attribute "target", where its values 'new' for the popup, 'current' for within the form with breadcrumb.
yeah I thought as much. Thanks for the help
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 7 25
|
4702 | ||
|
2
thg 12 24
|
7815 | ||
How to ORDER BY? [Odoo 10]
Đã xử lý
|
|
2
thg 11 24
|
28605 | |
|
2
thg 5 24
|
7538 | ||
|
3
thg 3 24
|
6963 |
Yes, you can, Just check the link happening whenever you click a menu. You have to find the action_id using env.ref, then pass as a URL.
Thanks... is this what you meant href="/web?&debug=#menu_id=93&action=143" class="oe_menu_leaf" data-menu="93" data-action-model="ir.actions.act_window" data-action-id="143"?
hello, how can we also set some filter value and group by values enabled at the same time? the href opens up the view but how can i also set some filters at the same time