Update stubs

This commit is contained in:
Trinh Anh Ngoc
2021-11-09 21:35:09 +07:00
parent 82f9c6083e
commit 04f30f1e1c
6 changed files with 23 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
from . import addons as addons, api as api, cli as cli, conf as conf, fields as fields, http as http, loglevels as loglevels, models as models, netsvc as netsvc, osv as osv, release as release, service as service, sql_db as sql_db, tools as tools, upgrade as upgrade
from odoo.fields import Command as Command
from odoo.tools.translate import _ as _, _lt as _lt
from .fields import Command as Command
from .tools.translate import _ as _, _lt as _lt
from typing import Any
__path__: Any

View File

@@ -1,11 +1,11 @@
from collections import defaultdict
from weakref import WeakSet
from collections.abc import Mapping
from typing import Any
from weakref import WeakSet
from odoo.modules.registry import Registry
from odoo.sql_db import Cursor
from odoo.tools import StackMap
from .modules.registry import Registry
from .sql_db import Cursor
from .tools import StackMap
__all__: Any
_logger: Any
@@ -66,7 +66,7 @@ class Environment(Mapping):
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __hash__(self) -> int: ...
def __call__(self, cr: Any | None = ..., user: Any | None = ..., context: Any | None = ..., su: Any | None = ...) -> Environment: ...
def __call__(self, cr: Cursor | None = ..., user: Any | None = ..., context: Any | None = ..., su: Any | None = ...) -> Environment: ...
def ref(self, xml_id, raise_if_not_found: bool = ...): ...
def is_superuser(self) -> bool: ...
def is_admin(self) -> bool: ...

View File

@@ -2,7 +2,7 @@ import datetime
import enum
from typing import Any
from odoo.tools import date_utils
from .tools import date_utils
DATE_LENGTH: Any
DATETIME_LENGTH: Any

View File

@@ -1,11 +1,11 @@
import werkzeug.wrappers
from datetime import date as date
from typing import Any, Union
from odoo.api import Environment
from odoo.modules.registry import Registry
from odoo.sql_db import Cursor
from odoo.tools import pycompat as pycompat
from odoo.tools._vendor import sessions
import werkzeug.wrappers
from .api import Environment
from .modules.registry import Registry
from .sql_db import Cursor
from .tools._vendor import sessions
_logger: Any
rpc_request: Any

View File

@@ -1,12 +1,10 @@
from collections.abc import MutableMapping
from psycopg2.extensions import AsIs as AsIs
from typing import Any, Generator, List
from odoo import api, fields
from odoo.api import Environment
from odoo.modules.registry import Registry
from odoo.sql_db import Cursor
from odoo.tools import Collector as Collector
from . import api, fields
from .api import Environment
from .modules.registry import Registry
from .sql_db import Cursor
_logger: Any
_schema: Any

View File

@@ -1,8 +1,9 @@
import psycopg2.extensions
from typing import Any
from odoo.api import Transaction
from odoo.tools import Callbacks
import psycopg2.extensions
from .api import Transaction
from .tools import Callbacks
_logger: Any