diff --git a/runbot/data/error_link.xml b/runbot/data/error_link.xml index 155de13b..43290e0e 100644 --- a/runbot/data/error_link.xml +++ b/runbot/data/error_link.xml @@ -1,6 +1,6 @@ - Link build errors + Merge build errors ir.actions.server @@ -39,7 +39,7 @@ records.action_assign() - + Deduplicate Error Contents @@ -49,4 +49,13 @@ records.action_deduplicate() + + View build errors + + ir.actions.server + code + + action = records.action_view_build_errors() + + diff --git a/runbot/models/build.py b/runbot/models/build.py index 7f6edfe1..726933cb 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -1268,3 +1268,15 @@ class BuildResult(models.Model): def _parse_config(self): return set(findall(self._server("tools/config.py"), r'--[\w-]+', )) + + def action_view_build_errors(self): + errors = self.env['runbot.build.error'].browse() + for record in self: + errors |= record.error_log_ids.error_content_id.error_id + return { + "type": "ir.actions.act_window", + "res_model": "runbot.build.error", + "domain": [('id', 'in', errors.ids)], + "name": "Build errors", + "view_mode": "list,form" + } diff --git a/runbot/models/build_error.py b/runbot/models/build_error.py index 600f7912..7bb96c78 100644 --- a/runbot/models/build_error.py +++ b/runbot/models/build_error.py @@ -313,7 +313,7 @@ class BuildError(models.Model): if build_error_contents: window_action = { "type": "ir.actions.act_window", - "res_model": "runbot.build.error", + "res_model": "runbot.build.error.content", "views": [[False, "list"]], "domain": [('id', 'in', build_error_contents.ids)] }