コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4026 ビュー

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
2月 25
8547
0
8月 22
59
1
2月 16
5846
0
12月 24
989
1
3月 24
1545