[IMP] runbot: add an action to parse logs from build error views

This commit is contained in:
Christophe Monniez 2019-08-30 16:33:39 +02:00 committed by Xavier-Do
parent c49e422a25
commit 4c75a8e107
2 changed files with 15 additions and 0 deletions

View File

@ -9,4 +9,14 @@
records._parse_logs()
</field>
</record>
<record model="ir.actions.server" id="action_parse_log">
<field name="name">Parse log entry</field>
<field name="model_id" ref="runbot.model_runbot_error_log" />
<field name="binding_model_id" ref="runbot.model_runbot_error_log" />
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">
records._parse_logs()
</field>
</record>
</odoo>

View File

@ -100,6 +100,11 @@ class RunbotErrorLog(models.Model):
"target": "new",
}
def _parse_logs(self):
BuildError = self.env['runbot.build.error']
BuildError._parse_logs(self)
@api.model_cr
def init(self):
""" Create an SQL view for ir.logging """