se retiran archivos no usados

FossilOrigin-Name: 05431311b7cfe21cbde218f35b5adaef4171a78ed19c87b9e8bc8119ea091e45
This commit is contained in:
bit4bit 2021-06-25 23:23:07 +00:00
parent c694603505
commit ab462a6ca5
3 changed files with 1 additions and 22 deletions

View File

@ -1,11 +1,10 @@
from .attribute import Attribute
from .many2one import Many2One
from .model import Model
from .function import Function
from .virtual import Virtual
from .field import Field
__all__ = [Attribute, Many2One, Model, Virtual, Field]
__all__ = [Attribute, Many2One, Virtual, Field]
def on_change(fields):
from functools import wraps

View File

@ -1,5 +1,4 @@
from .field import Field
from .model import Model
class Function(Field):
"""

View File

@ -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)