Hello! I'm trying to create a task kanban that involves tasks from all projects. But when a stage has no task, it does not appear in the kanban. Does anyone know how to make it appear?
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- CRM
 - e-Commerce
 - Comptabilité
 - Inventaire
 - PoS
 - Project
 - MRP
 
Cette question a été signalée
Hi,
If you want to show all stages, regardless of whether they have tasks or not, you can make use of the 'group_expand' attribute. Here's an example of how you can achieve this:
Example:
service_state = fields.Selection([('draft', 'Draft'), ('assigned', 'Assigned'),
('completed', 'Completed'), ('returned', 'Returned'),
('not_solved', 'Not solved')],
string='Service Status', group_expand='_group_expand_states',
default='draft', track_visibility='always')
In this example, the 'group_expand' attribute contains a function named ‘_group_expand_states.’ The function is defined as follows:
def _group_expand_states(self, states, domain, order):
return [key for key, val in type(self).service_state.selection]
Here, the function '_group_expand_states' returns a list of states. It aims to pass all the selection fields in list form to the 'group_expand' method. In the XML, the state field is defined as a regular field, as illustrated in the above example.
Hope it helps
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
| 
             | 
        
            
                
                0
            
            
             févr. 24  
         | 
        2201 | ||
| 
             | 
        
            
                
                2
            
            
             mai 24  
         | 
        2791 | ||
| 
             | 
        
            
                
                1
            
            
             juin 23  
         | 
        4034 | ||
| 
             | 
        
            
                
                1
            
            
             nov. 22  
         | 
        4434 | ||
| 
     
            
                Cannot create task
            
            
                    Résolu
            
         
     | 
        
             | 
        
            
                
                2
            
            
             juin 20  
         | 
        4570 |