How to filter ManyToOne depending on the item selected below

Hello i’ve two dropdown list in manytoone. I wan the second dropdown to be filter if a select an item on the first.
Ex: 1st manytoone is Country and the 2nd is City. I wan to filter Cities according to the country i’ve selected. How to do?

Hello

Specify the domain on second field (i.e. city).

Suppose you have following two field in your view and have specified domain on city field depending on country field.
<field name="country" />
<field name="city" domain="self.country = :country"/>

For self.country, country is the field in City domain model.

Thank you

1 « J'aime »

Hi!
It work thanks

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.