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)Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
2
lut 25
|
9470 | |||
|
0
sie 22
|
59 | |||
|
How to compare dates before validation
Rozwiązane
|
1
lut 16
|
6646 | ||
|
0
gru 24
|
1545 | |||
|
1
mar 24
|
2253 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.