Empty groups in Kanban view of Odoo10

…衆ロ難τιáo~ 提交于 2019-12-10 11:16:35

问题


Is it possible to show groups (columns) without any items in Kanban view of Odoo10?

I found an article how to do that in Odoo8, but the way that is described there doesn't seem to work anymore.


回答1:


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')



回答2:


"_read_group_stage_ids " method return a list of stages so in your case try to pass all selection fields object in list form to group_expand method .



来源:https://stackoverflow.com/questions/40751733/empty-groups-in-kanban-view-of-odoo10

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!