mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 05:32:05 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -19,6 +19,7 @@ from odoo.exceptions import (
|
|||
from odoo.models import BaseModel
|
||||
from odoo.modules.registry import Registry
|
||||
from odoo.tools import lazy
|
||||
from odoo.tools.safe_eval import _UNSAFE_ATTRIBUTES
|
||||
|
||||
from .server import thread_local
|
||||
|
||||
|
|
@ -50,7 +51,7 @@ def get_public_method(model: BaseModel, name: str):
|
|||
"""
|
||||
assert isinstance(model, BaseModel)
|
||||
e = f"Private methods (such as '{model._name}.{name}') cannot be called remotely."
|
||||
if name.startswith('_'):
|
||||
if name.startswith('_') or name in _UNSAFE_ATTRIBUTES:
|
||||
raise AccessError(e)
|
||||
|
||||
cls = type(model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue