This commit is contained in:
Trinh Anh Ngoc
2019-12-09 16:54:22 +07:00
parent 40f7b77380
commit b89a873218
4 changed files with 29 additions and 23 deletions

View File

@@ -14,19 +14,6 @@ SUPERUSER_ID: int
def registry(database_name: Optional[Any] = ...): ... def registry(database_name: Optional[Any] = ...): ...
from . import addons from . import (addons, exceptions, conf, loglevels, modules, netsvc, osv, release,
from . import conf service, sql_db, tools, models, fields, api, cli, http)
from . import loglevels
from . import modules
from . import netsvc
from . import osv
from . import release
from . import service
from . import sql_db
from . import tools
from . import models
from . import fields
from . import api
from . import cli
from . import http
from .tools.translate import _ as _ from .tools.translate import _ as _

View File

@@ -5,6 +5,8 @@
from collections import Mapping from collections import Mapping
from typing import Any, Optional from typing import Any, Optional
from .sql_db import Cursor
class Params: class Params:
args: Any = ... args: Any = ...
kwargs: Any = ... kwargs: Any = ...
@@ -37,6 +39,9 @@ def guess(method: Any): ...
def call_kw(model: Any, name: Any, args: Any, kwargs: Any): ... def call_kw(model: Any, name: Any, args: Any, kwargs: Any): ...
class Environment(Mapping): class Environment(Mapping):
cr: Cursor = ...
uid: int = ...
context: dict = ...
def envs(cls): ... def envs(cls): ...
@classmethod @classmethod
def manage(cls) -> None: ... def manage(cls) -> None: ...

View File

@@ -1,6 +1,14 @@
# Stubs for odoo.http (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional, Union from typing import Any, Optional, Union
import werkzeug.wsgi from werkzeug.contrib.sessions import Session
import werkzeug.wrappers
from .api import Environment
from .sql_db import Cursor
rpc_request: Any rpc_request: Any
rpc_response: Any rpc_response: Any
@@ -16,17 +24,17 @@ def local_redirect(path: Any, query: Optional[Any] = ..., keep_hash: bool = ...,
def redirect_with_hash(url: Any, code: int = ...): ... def redirect_with_hash(url: Any, code: int = ...): ...
class WebRequest: class WebRequest:
httprequest: Any = ... httprequest: werkzeug.wrappers.Request = ...
httpresponse: Any = ... httpresponse: Response = ...
disable_db: bool = ... disable_db: bool = ...
endpoint: Any = ... endpoint: Any = ...
endpoint_arguments: Any = ... endpoint_arguments: Any = ...
auth_method: Any = ... auth_method: Any = ...
def __init__(self, httprequest: Any) -> None: ... def __init__(self, httprequest: Any) -> None: ...
@property @property
def cr(self): ... def cr(self) -> Cursor: ...
@property @property
def uid(self): ... def uid(self) -> int: ...
@uid.setter @uid.setter
def uid(self, val: Any) -> None: ... def uid(self, val: Any) -> None: ...
@property @property
@@ -34,10 +42,12 @@ class WebRequest:
@context.setter @context.setter
def context(self, val: Any) -> None: ... def context(self, val: Any) -> None: ...
@property @property
def env(self): ... def env(self) -> Environment: ...
context: Any = ... context: Any = ...
@property
def lang(self): ... def lang(self): ...
def session(self): ... @property
def session(self) -> OpenERPSession: ...
def __enter__(self): ... def __enter__(self): ...
uid: Any = ... uid: Any = ...
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ... def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...
@@ -96,7 +106,7 @@ def routing_map(modules: Any, nodb_only: Any, converters: Optional[Any] = ...):
class AuthenticationError(Exception): ... class AuthenticationError(Exception): ...
class SessionExpiredException(Exception): ... class SessionExpiredException(Exception): ...
class OpenERPSession(werkzeug.contrib.sessions.Session): class OpenERPSession(Session):
inited: bool = ... inited: bool = ...
modified: bool = ... modified: bool = ...
rotate: bool = ... rotate: bool = ...

View File

@@ -1,3 +1,7 @@
# Stubs for odoo.models (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from collections import MutableMapping from collections import MutableMapping
from typing import Any, Optional, List, Union, Sequence, Tuple, Dict, Generator from typing import Any, Optional, List, Union, Sequence, Tuple, Dict, Generator