replace stale web_editor with html_editor and html_builder for 19.0

web_editor was removed in Odoo 19.0 and replaced by html_editor
and html_builder. The old web_editor was incorrectly included in
the 19.0 vanilla import.

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2026-03-09 15:31:13 +01:00
parent 4b94f0abc5
commit f866779561
1513 changed files with 396049 additions and 358525 deletions

View file

@ -0,0 +1,27 @@
from odoo import models
from odoo.http import request
CONTEXT_KEYS = ['editable', 'edit_translations', 'translatable']
class IrHttp(models.AbstractModel):
_inherit = "ir.http"
@classmethod
def _get_editor_context(cls):
""" Check for ?editable and stuff in the query-string """
return {
key: True
for key in CONTEXT_KEYS
if key in request.httprequest.args and key not in request.env.context
}
@classmethod
def _pre_dispatch(cls, rule, args):
super()._pre_dispatch(rule, args)
ctx = cls._get_editor_context()
request.update_context(**ctx)
@classmethod
def _get_translation_frontend_modules_name(cls):
return ["html_editor", *super()._get_translation_frontend_modules_name()]