Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

Is there any way to submit data from the website to a server action and return a url back to the client, without developing a custom module?

1. A website user types "1000" and clicks a button.

2. A server action computes a url "https://externalsite.com/1000".

3. The client will send the user to the url "https://externalsite.com/1000"

Q1: How to pass data from the website to the server action?

Q2: How to return the dynamic url to the client?

I made a server action for model "website.page" with this test code:

action = {
    "type": "ir.actions.act_url",
    "url": "https://odoo.com",
    "target": "self",
}

I clicked the button "Create Contextual Action". Navigating to the list of website pages, opening a page in form view and clicking the context menuitem will route me to odoo.com.

I clicked to make the server action available on the website, as http://localhost:8072/website/action/test. This link will NOT route me to odoo.com even though the code is executing. Why?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
9787
3
thg 3 24
5434
0
thg 1 21
5077
1
thg 1 21
3456
1
thg 4 17
7557