1
votes

I am working on kanban view of purchase order in which I used attribute “ default_group_by” by this all the purchase orders comes in defined stages (i.e ‘po_stage)’

enter image description here

But when PO has not any define stage then that kanban view got deleted from the view as below

enter image description here

for that I used _group_by_full attribute as per link

but this does not work for me so can you please suggested me how I can archive this .

2

2 Answers

0
votes

First Make sure you add <kanban default_group_by="your_group_by_field"> , Also be sure that the inherited view does not have a default group_by , if so remove it.

0
votes

In odoo 10 group_by_default is replaced by group_expand and it takes list of all your stages. for e.g your columns are stage and you want to show all empty stages.

@api.model
def _read_group_stage_ids(self,stages,domain,order):
    stage_ids = self.env['stage.stage'].search([])
    return stage_ids

stage = fields.Many2one('stage.stage', group_expand='_read_group_stage_ids')