you can use group_expand method to set the order:
state = fields.Selection([
('draft', 'Draft'),
('open', 'Open'),
('pending', 'Pending'),
('cancel', 'Cancelled'),
('done', 'Done')],
'State',
group_expand='_expand_groups',
default='draft'
)
@api.model
def _expand_groups(self, states, domain, order):
return ['draft', 'open', 'pending', 'cancel', 'done']
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…