跳至內容
選單
此問題已被標幟
3 回覆
1565 瀏覽次數

I am making a form on a website with the odoo editor, the objective is for the client to register their address themselves. I am in Mexico and when I enter the State and Country fields, all the states and all the countries of the world! and they are not linked.

This does not happen in the Contacts app there if they are linked.

How do I limit it to only showing the countries of Mexico and the United States with their respective states?

I'm using Odoo 18.0+e (Enterprise)

頭像
捨棄
最佳答案

When you add the Country field to the Form, in the Field options, you will see the Option List where you can reorder or remove countries you don't need. 

For the state, I can't think of an easy way to automatically show the states for the selected countries without some javascript/controller codes. But if you know how to write these javascript/controller, you'd already written the whole custom form.

頭像
捨棄
最佳答案

I am working on a v17 and I've got a task that have to create a form in website and in this when i select country it automatically shows only the states of that country and have to use onchange in JS side. So if anyone have done this please explain how to do it.

頭像
捨棄
最佳答案

Most contact forms (other website platforms) index the list of available states or province to be indexed by the country field type as long as the country field type is the first parameter of the address. I can't believe ODOO does not support this indexing feature??? Is this coming soon? The implication for our customers is confusing.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 25
745
0
2月 25
814
1
1月 25
1311
3
8月 25
784
1
8月 25
311