0
Wie können wir die abhängige Auswahl von Land-> Land-> Stadt in Odoo erstellen?Loading Land -> Bundesland -> Stadt in Odoo
- Zum Beispiel -
- Ausgewählte Land = USA
- die
- State = Texas, Kalifornien, Ohio, Alle Zustand US geladen werden .. etc,
- Ausgewählter Zustand = Texas
- Bei Auswahl des Status werden alle Städte im ausgewählten Status geladen.
- Ort = Austin, Huston, ..etc.
- Ausgewählte Land = USA
Wie können wir dies in Odoo erreichen?
Ich habe unten Code in model.py erstellt
country = fields.Many2one('res.country',string='Country', help='Select Country')
state = fields.Many2one('state.country',string='State', help='Enter State')
city = fields.Char('City', help='Enter City')
view.xml Datei direkt unter Code:
<field name="country"/>
<field name="state"/>
<field name="city"/>