This commit is contained in:
Trinh Anh Ngoc
2019-12-09 22:09:04 +07:00
parent 9d990e0c3b
commit d97338d305
3 changed files with 35 additions and 27 deletions

View File

@@ -1,11 +1,11 @@
# Stubs for odoo.fields (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .sql_db import LazyCursor
from .tools.mimetypes import guess_mimetype
import datetime
from typing import Any, Optional
from .tools import date_utils
DATE_LENGTH: Any
DATETIME_LENGTH: Any
EMPTY_DICT: Any
@@ -60,7 +60,7 @@ class Field:
def read(self, records: Any): ...
def create(self, record_values: Any) -> None: ...
def write(self, records: Any, value: Any): ...
def __get__(self, record: Any, owner: Any): ...
# def __get__(self, record: Any, owner: Any): ...
def __set__(self, record: Any, value: Any) -> None: ...
def compute_value(self, records: Any) -> None: ...
def determine_value(self, record: Any) -> None: ...
@@ -137,17 +137,17 @@ class Date(Field):
type: str = ...
column_type: Any = ...
column_cast_from: Any = ...
start_of: Any = ...
end_of: Any = ...
add: Any = ...
subtract: Any = ...
start_of = date_utils.start_of
end_of = date_utils.end_of
add: date_utils.add
subtract: date_utils.subtract
@staticmethod
def today(*args: Any): ...
def today(*args: Any) -> datetime.date: ...
@staticmethod
def context_today(record: Any, timestamp: Optional[Any] = ...): ...
def context_today(record: Any, timestamp: Optional[Any] = ...) -> datetime.date: ...
@staticmethod
def to_date(value: Any): ...
from_string: Any = ...
def to_date(value: Any) -> datetime.date: ...
from_string = to_date
@staticmethod
def to_string(value: Any): ...
def convert_to_cache(self, value: Any, record: Any, validate: bool = ...): ...
@@ -157,21 +157,21 @@ class Datetime(Field):
type: str = ...
column_type: Any = ...
column_cast_from: Any = ...
start_of: Any = ...
end_of: Any = ...
add: Any = ...
subtract: Any = ...
start_of = date_utils.start_of
end_of = date_utils.end_of
add = date_utils.add
subtract: date_utils.subtract
@staticmethod
def now(*args: Any): ...
def now(*args: Any) -> datetime.datetime: ...
@staticmethod
def today(*args: Any): ...
def today(*args: Any) -> datetime.datetime: ...
@staticmethod
def context_timestamp(record: Any, timestamp: Any): ...
def context_timestamp(record: Any, timestamp: Any) -> datetime.datetime: ...
@staticmethod
def to_datetime(value: Any): ...
from_string: Any = ...
def to_datetime(value: Any) -> datetime.datetime: ...
from_string = to_datetime
@staticmethod
def to_string(value: Any): ...
def to_string(value: Any) -> str: ...
def convert_to_cache(self, value: Any, record: Any, validate: bool = ...): ...
def convert_to_export(self, value: Any, record: Any): ...
def convert_to_display_name(self, value: Any, record: Any): ...