This commit is contained in:
Trinh Anh Ngoc
2019-12-10 10:46:10 +07:00
parent 64bf939bf7
commit 0a590d60d7
2 changed files with 12 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ class Environment(Mapping):
cache: Any = ...
dirty: Any = ...
all: Any = ...
def __new__(cls, cr: Any, uid: Any, context: Any): ...
def __new__(cls, cr: Any, uid: Any, context: Any) -> Environment: ...
def __contains__(self, model_name: Any): ...
def __getitem__(self, model_name: Any): ...
def __iter__(self): ...

View File

@@ -1,13 +1,14 @@
# Stubs for odoo.models (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import datetime
from collections import MutableMapping
from typing import Any, Optional, List, Union, Sequence, Tuple, Dict, Generator
from . import api, fields
from .api import Environment
from .modules.registry import Registry
from .sql_db import Cursor
SearchDomain = List[Union[str, Sequence[str]]]
RecordValue = Dict[str, Any]
@@ -53,16 +54,23 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
_inherits: Dict[str, str]
_rec_name: str
_order: str
_context: Dict
_fields: Dict[str, fields.Field]
_context: Dict
_cr: Cursor
_uid: int
id: int
env: Environment
pool: Registry
display_name: str
create_uid = env['res.users']
create_date: datetime.datetime
write_uid = env['res.users']
write_date = datetime.datetime
CONCURRENCY_CHECK_FIELD: str = ...
def view_init(self, fields_list: Any) -> None: ...
def compute_concurrency_field(self) -> None: ...
def compute_concurrency_field_with_access(self) -> None: ...
def __new__(cls) -> None: ...
def __new__(cls) -> BaseModel: ...
def __init__(self, pool: Any, cr: Any) -> None: ...
def export_data(self, fields_to_export: Any, raw_data: bool = ...): ...
def load(self, fields: Any, data: Any): ...