mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[REF] runbot: use selection_add
This commit is contained in:
parent
df157f7742
commit
1069598616
@ -57,9 +57,9 @@ class runbot_build(models.Model):
|
|||||||
# state machine
|
# state machine
|
||||||
|
|
||||||
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True)
|
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True)
|
||||||
local_state = fields.Selection(make_selection(state_order), string='Build Status', default='pending', required=True, oldname='state', index=True)
|
local_state = fields.Selection(make_selection(state_order), string='Build Status', default='pending', required=True, index=True)
|
||||||
global_result = fields.Selection(make_selection(result_order), string='Result', compute='_compute_global_result', store=True)
|
global_result = fields.Selection(make_selection(result_order), string='Result', compute='_compute_global_result', store=True)
|
||||||
local_result = fields.Selection(make_selection(result_order), string='Build Result', oldname='result')
|
local_result = fields.Selection(make_selection(result_order), string='Build Result')
|
||||||
triggered_result = fields.Selection(make_selection(result_order), string='Triggered Result') # triggered by db only
|
triggered_result = fields.Selection(make_selection(result_order), string='Triggered Result') # triggered by db only
|
||||||
|
|
||||||
requested_action = fields.Selection([('wake_up', 'To wake up'), ('deathrow', 'To kill')], string='Action requested', index=True)
|
requested_action = fields.Selection([('wake_up', 'To wake up'), ('deathrow', 'To kill')], string='Action requested', index=True)
|
||||||
|
@ -16,7 +16,7 @@ class runbot_event(models.Model):
|
|||||||
|
|
||||||
build_id = fields.Many2one('runbot.build', 'Build', index=True, ondelete='cascade')
|
build_id = fields.Many2one('runbot.build', 'Build', index=True, ondelete='cascade')
|
||||||
active_step_id = fields.Many2one('runbot.build.config.step', 'Active step', index=True)
|
active_step_id = fields.Many2one('runbot.build.config.step', 'Active step', index=True)
|
||||||
type = fields.Selection(TYPES, string='Type', required=True, index=True)
|
type = fields.Selection(selection_add=TYPES, string='Type', required=True, index=True)
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
parent_class = super(runbot_event, self)
|
parent_class = super(runbot_event, self)
|
||||||
|
Loading…
Reference in New Issue
Block a user