Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3636 มุมมอง

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?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ค. 25
9669
3
มี.ค. 24
5271
0
ม.ค. 21
4661
Website form field conditions แก้ไขแล้ว
1
ม.ค. 21
3327
How do I change my Odoo Website URL? แก้ไขแล้ว
1
เม.ย. 17
7388