I have this class
name = fields.Char("Name")
sequence = fields.Integer("Sequence")
description = fields.Text("Description")
I need a search method to find the id with lower sequence
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have this class
name = fields.Char("Name")
sequence = fields.Integer("Sequence")
description = fields.Text("Description")
I need a search method to find the id with lower sequence
Hi Josemi
you could do it like:
lowest_id = self.env['model_name'].search([('sequence', '!=', False)], order='ASC', limit=1)Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
2
Feb 25
|
9317 | ||
|
|
0
Agu 22
|
59 | ||
|
How to compare dates before validation
Diselesaikan
|
|
1
Feb 16
|
6498 | |
|
|
0
Des 24
|
1438 | ||
|
|
1
Mar 24
|
2141 |