I am trying to display stages for a model defined as a Selection field in Kanban view in Odoo 10. But when I add the stage field in Kanban view, stages with records in it are displayed in kanban view but not all stages.
I have a Selection field with 3 stages and a Kanban view. I used bellow code in my xml to display them the stages in Kanban view.
This is my Selection field:
stage = fields.Selection([
('not reviewed', 'Not Reviewed'),
('review in progress', 'Review In Progress'),
('review complete', 'Review Complete')
], default='not reviewed')
There is the xml part where I use the Selection field in the kanban view to be displayed in view:
<record id="sources_daily_review_kanban_view" model="ir.ui.view">
<field name="name">Daily Sources Review Kanban</field>
<field name="model">daily.source.review</field>
<field name="arch" type="xml">
<kanban default_group_by="stage" class="o_kanban_small_column o_opportunity_kanban">
<field name="stage" options='{"group_by_tooltip": {"requirments": "Description", "legend_priority": "Use of stars"}}'/>
<field name="color"/>
<field name="name"/>
<field name="description"/>
<field name="responsible"/>
<field name="active"/>
<field name="source_date"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-bars fa-log"/>
</a>
<ul class="dropdown-menu" role="menu" area-labelledby="dLabel">
<t t-if="widget.editable"><li><a type="edit">Edit</a></li></t>
<t t-if="widget.deletable"><li><a type="delete">Delete</a></li></t>
<li t-if="! record.active.value"><a name="action_set_active" type="object">Unarchive</a></li>
<li t-if="record.active.value"><a name="action_set_unactive" type="object">Archive</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
</div>
<div class="oe_kanban_content">
<div>
<field name="tag_ids"/>
</div>
<div>
<strong><field name="name" domain="[('including_in_daily_review', '=', True)]"/></strong>
</div>
<div>
<field name="description"/>
</div>
<div>
<field name="responsible"/>
</div>
<div class="oe_kanban_footer">
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
This code displays only those stages which there is a record in that stage while I want all stages to be displayed even the empty ones. I searched a lot and find https://stackoverflow.com/a/40761734/2498426 solution related to this problem. but it was not clear for my case (Selection field).