se retiran archivos no usados
FossilOrigin-Name: 05431311b7cfe21cbde218f35b5adaef4171a78ed19c87b9e8bc8119ea091e45
This commit is contained in:
parent
c694603505
commit
ab462a6ca5
@ -1,11 +1,10 @@
|
|||||||
from .attribute import Attribute
|
from .attribute import Attribute
|
||||||
from .many2one import Many2One
|
from .many2one import Many2One
|
||||||
from .model import Model
|
|
||||||
from .function import Function
|
from .function import Function
|
||||||
from .virtual import Virtual
|
from .virtual import Virtual
|
||||||
from .field import Field
|
from .field import Field
|
||||||
|
|
||||||
__all__ = [Attribute, Many2One, Model, Virtual, Field]
|
__all__ = [Attribute, Many2One, Virtual, Field]
|
||||||
|
|
||||||
def on_change(fields):
|
def on_change(fields):
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
from .field import Field
|
from .field import Field
|
||||||
from .model import Model
|
|
||||||
|
|
||||||
class Function(Field):
|
class Function(Field):
|
||||||
"""
|
"""
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
from .field import Field
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
class Model(Field):
|
|
||||||
def __init__(self, model, name=None, namespace=None):
|
|
||||||
self.model = model
|
|
||||||
self.namespace = namespace
|
|
||||||
self.field_name = name
|
|
||||||
warnings.warn('deprecated use Many2One instead')
|
|
||||||
|
|
||||||
def __get__(self, inst, cls):
|
|
||||||
if inst is None:
|
|
||||||
return self
|
|
||||||
assert self.name is not None
|
|
||||||
return self._create_model(inst, name=self.field_name)
|
|
||||||
|
|
||||||
def __set__(self, inst, value):
|
|
||||||
obj = self._create_model(inst, name=self.field_name)
|
|
||||||
obj._set_content(value)
|
|
Loading…
Reference in New Issue
Block a user