[IMP] runbot_merge: suppress view validation warning

This is a dumb false positive, kill it.
This commit is contained in:
Xavier Morel 2024-09-27 12:53:51 +02:00
parent 8f27773f8d
commit 430ccab2cb
2 changed files with 18 additions and 0 deletions

View File

@ -1,4 +1,5 @@
from . import ir_actions
from . import ir_ui_view
from . import res_partner
from . import project
from . import pull_requests

View File

@ -0,0 +1,17 @@
from odoo import models
class View(models.Model):
_inherit = 'ir.ui.view'
def _log_view_warning(self, msg, node):
"""The view validator is dumb and triggers a warning because there's a
`field.btn`, even though making a `field[widget=url]` (which renders as
a link) look like a button is perfectly legitimate.
Suppress that warning.
"""
if node.tag == 'field' and node.get('widget') == 'url' and "button/submit/reset" in msg:
return
super()._log_view_warning(msg, node)