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

For example a country has multiple cities ... when i pick a country from the first selection,i want my second select field to populate with the cities of the picked country.

อวตาร
ละทิ้ง

I think you are talking about dependent drop down, have a look into: http://learnopenerp.blogspot.com/2016/10/onchange-many2one-filed-in-odoo.html

คำตอบที่ดีที่สุด

Can't be done directly in Odoo Studio, but it's quite easy to manually update the view created by Studio.  

You need to go to Settings > Technical > Views > User Interface and search for "Studio".  You should find the new view, which will only show the new fields or any other changes you have made  (the View name will start with "Odoo Studio").

So in this example I am selecting based on another field I added in Studio  

<field name="x_studio_field_1zo8y" domain="[('parent_id', '=', x_studio_field_KdnyA)]" />

In your example parent_id would be the country code field in the City table, and x_studio_field_KdnyA would be the country entered by the user. 

Note that Studio will show this as an invalid domain so you have to directly edit the view to make any further changes.  But if you mess things up you can always delete the Studio view and start again.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

thanks for the response yeah But how i do that in studio ? 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
2825
2
ธ.ค. 21
5832
Odoo studio icon is disabled แก้ไขแล้ว
1
เม.ย. 25
4717
0
ส.ค. 19
2844
1
ต.ค. 22
2864