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)Create an account today to enjoy exclusive features and engage with our awesome community!
Tilmeld dig| Related Posts | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
2
feb. 25
|
9480 | |||
|
0
aug. 22
|
59 | |||
|
1
feb. 16
|
6649 | |||
|
0
dec. 24
|
1550 | |||
|
1
mar. 24
|
2255 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.