Hello,
I'm an odoo and python beginner and I'm building a small module for odoo, i have a model with a state attribute and i want to sort my tree view using the state field but i don't want the order to be done alphabetically.
here is my state field definition
state = fields.Selection(
[
('creation', "En création"),
('blocage', "Création"),
('listage', "A lister"),
('gel', "A geler + Analyse"),
('reponse', "A répondre"),
('avis', "Attente réponse client"),
('traitement', "En cours de traitement"),
('clos', "Clos"),
]
)
And i want the list view to be sorted according to the state so that records in 'creation' state will be the first one.
Thanks for helping.
did you try it?