mirror of
https://github.com/bringout/oca-web.git
synced 2026-04-18 20:52:03 +02:00
Add oca-web submodule with 68 web modules
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
af56672c08
commit
53fddf87c8
2469 changed files with 101716 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
from . import ir_config_parameter
|
||||
from . import ir_http
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
from odoo import api, models
|
||||
|
||||
|
||||
class IrConfigParameter(models.Model):
|
||||
_inherit = "ir.config_parameter"
|
||||
|
||||
@api.model
|
||||
def get_web_m2x_options(self):
|
||||
opts = [
|
||||
"web_m2x_options.create",
|
||||
"web_m2x_options.create_edit",
|
||||
"web_m2x_options.limit",
|
||||
"web_m2x_options.search_more",
|
||||
"web_m2x_options.m2o_dialog",
|
||||
"web_m2x_options.field_limit_entries",
|
||||
]
|
||||
values = self.sudo().search_read([["key", "in", opts]], ["key", "value"])
|
||||
return {res["key"]: res["value"] for res in values}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue