跳至內容
選單
此問題已被標幟

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?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
5月 25
9637
3
3月 24
5247
0
1月 21
4359
1
1月 21
3293
1
4月 17
7326