Skip to content

Commit

Permalink
[FIX] event: fix and provide a default value to kanban state
Browse files Browse the repository at this point in the history
In the event form view, when only community is installed, kanban state
is not on the right part of the form.

Moreover it should have a default value.

Task 2188857
PR #44545

X-original-commit: 1813f06
  • Loading branch information
std-odoo authored and tde-banana-odoo committed Feb 18, 2020
1 parent 71206f4 commit 9b55dfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/event/models/event_event.py
Expand Up @@ -116,7 +116,7 @@ def _get_default_stage_id(self):
color = fields.Integer('Kanban Color Index')
event_mail_ids = fields.One2many('event.mail', 'event_id', string='Mail Schedule', copy=True)
# Kanban fields
kanban_state = fields.Selection([('normal', 'In Progress'), ('done', 'Done'), ('blocked', 'Blocked')])
kanban_state = fields.Selection([('normal', 'In Progress'), ('done', 'Done'), ('blocked', 'Blocked')], default='normal')
kanban_state_label = fields.Char(compute='_compute_kanban_state_label', string='Kanban State Label', tracking=True, store=True)
stage_id = fields.Many2one(
'event.stage', ondelete='restrict', default=_get_default_stage_id,
Expand Down
2 changes: 1 addition & 1 deletion addons/event/views/event_views.xml
Expand Up @@ -207,7 +207,7 @@
<field name="legend_normal" invisible="1"/>
<field name="legend_done" invisible="1"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="kanban_state" widget="state_selection" class="ml-auto"/>
<field name="kanban_state" widget="state_selection" class="ml-auto float-right"/>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Event Name"/>
<h1><field name="name" placeholder="e.g. Conference for Architects"/></h1>
Expand Down

0 comments on commit 9b55dfc

Please sign in to comment.