Files
web/web_m2x_options/models/ir_http.py
chien d70acf8634 [FIX] web_m2x_options: Avoid constant RPC calls
Instead of calling interactively to the server to get the options, they are stored at the beginning of the session.
2024-07-24 08:15:52 +02:00

12 lines
335 B
Python

from odoo import models
class Http(models.AbstractModel):
_inherit = "ir.http"
def session_info(self):
IrConfigSudo = self.env["ir.config_parameter"].sudo()
session_info = super().session_info()
session_info.update({"web_m2x_options": IrConfigSudo.get_web_m2x_options()})
return session_info