Hi guys !
I want to create a dynamic drop down list using a table in my postgre database, can you please help me ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
1
ตอบกลับ
3441
มุมมอง
Hi,
You can create a Many2one field and use the widget='selection'.
Suppose you have a table named 'school.school' and it has got some records in it, and if you want to show this records in a selection field, create a Many2one field with comodel 'school.school'
school = fields.Many2one('school.school', string='School')
then in the XML,
<field name="school_id" widget='selection'/>
Thanks
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ