Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
1196 Visualizzazioni

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)

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 25
466
0
feb 25
619
1
gen 25
985
0
giu 25
2
0
giu 25
2