mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: improve host form view loading speedup
The host form view was loading slowly because of the domain != "done" whitch doesn't benefit from any index. Switching it to a list of state that are not done solves the issue.
This commit is contained in:
parent
9097aa4545
commit
3aeaa5220e
@ -63,7 +63,7 @@ class Host(models.Model):
|
|||||||
|
|
||||||
def _compute_build_ids(self):
|
def _compute_build_ids(self):
|
||||||
for host in self:
|
for host in self:
|
||||||
host.build_ids = self.env['runbot.build'].search([('host', '=', host.name), ('local_state', '!=', 'done')])
|
host.build_ids = self.env['runbot.build'].search([('host', '=', host.name), ('local_state', 'in', ('pending', 'testing', 'running'))])
|
||||||
|
|
||||||
@api.model_create_multi
|
@api.model_create_multi
|
||||||
def create(self, vals_list):
|
def create(self, vals_list):
|
||||||
|
Loading…
Reference in New Issue
Block a user