mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] project_task_line: make inline tree editable and update kanban states
H4497
This commit is contained in:
committed by
Mayank Patel
parent
32d79d96fc
commit
8245f25e93
@@ -27,14 +27,14 @@ class ProjectTaskLine(models.Model):
|
||||
user_id = fields.Many2one('res.users', string='User')
|
||||
sequence = fields.Integer(string='Sequence')
|
||||
kanban_state = fields.Selection([
|
||||
('normal', 'Grey'),
|
||||
('done', 'Green'),
|
||||
('blocked', 'Red')], string='Kanban State',
|
||||
('normal', ''),
|
||||
('done', 'Done'),
|
||||
('blocked', 'Blocked')], string='State',
|
||||
copy=False, default='normal', required=True,
|
||||
help="A task's kanban state indicates special situations affecting it:\n"
|
||||
" * Grey is the default situation\n"
|
||||
" * Red indicates something is preventing the progress of this task\n"
|
||||
" * Green indicates the task is complete")
|
||||
" * Blank is the default situation\n"
|
||||
" * Blocked indicates something is preventing the progress of this task\n"
|
||||
" * Doen indicates the task is complete")
|
||||
|
||||
@api.onchange('kanban_state')
|
||||
def _onchange_kanban_state(self):
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<xpath expr="//page[@name='description_page']" position="after">
|
||||
<page name="task_lines" string="Todo List">
|
||||
<field name="line_ids" widget="one2many_list" context="{'default_task_id': id}">
|
||||
<tree>
|
||||
<tree editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="kanban_state" widget="state_selection" string="Status"/>
|
||||
<field name="kanban_state" widget="selection" string="Status"/>
|
||||
<field name="user_id" string="Completed by" options="{'no_create': True, 'no_create_edit': True, 'no_open': True}"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user