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)Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
2
февр. 25
|
9380 | |||
|
0
авг. 22
|
59 | |||
|
1
февр. 16
|
6546 | |||
|
0
дек. 24
|
1483 | |||
|
1
мар. 24
|
2221 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.