diff options
| author | Raphael Collet <rco@openerp.com> | 2016-08-25 16:38:32 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-08-31 17:21:45 +0200 |
| commit | ff5e44d2dece70f2d1f56eba7dd4a5d2050c59ef (patch) | |
| tree | f2e9be06fd7660398aa1c6e0ca5bd146261b0199 /openerp | |
| parent | 6eca5d038fe383a5d48ab99a4c3a0bcd47f674e3 (diff) | |
[REM] models: remove `_all_columns`
Diffstat (limited to 'openerp')
| -rw-r--r-- | openerp/models.py | 14 | ||||
| -rw-r--r-- | openerp/osv/fields.py | 43 |
2 files changed, 0 insertions, 57 deletions
diff --git a/openerp/models.py b/openerp/models.py index ddcc720ecbb..582f4e66a65 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -2987,20 +2987,6 @@ class BaseModel(object): for name, source in parent._inherit_fields.iteritems(): struct[name] = (parent_model, parent_field, source[2], source[3]) - @property - def _all_columns(self): - """ Returns a dict mapping all fields names (self fields and inherited - field via _inherits) to a ``column_info`` object giving detailed column - information. This property is deprecated, use ``_fields`` instead. - """ - result = {} - # do not inverse for loops, since local fields may hide inherited ones! - for k, (parent, m2o, col, original_parent) in self._inherit_fields.iteritems(): - result[k] = fields.column_info(k, col, parent, m2o, original_parent) - for k, col in self._columns.iteritems(): - result[k] = fields.column_info(k, col) - return result - @api.model def _inherits_check(self): for table, field_name in self._inherits.items(): diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 8275efa4b4a..d4db13ba953 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -1814,46 +1814,3 @@ class property(function): fnct_search=self._property_search, **args ) - - -class column_info(object): - """ Struct containing details about an osv column, either one local to - its model, or one inherited via _inherits. - - .. attribute:: name - - name of the column - - .. attribute:: column - - column instance, subclass of :class:`_column` - - .. attribute:: parent_model - - if the column is inherited, name of the model that contains it, - ``None`` for local columns. - - .. attribute:: parent_column - - the name of the column containing the m2o relationship to the - parent model that contains this column, ``None`` for local columns. - - .. attribute:: original_parent - - if the column is inherited, name of the original parent model that - contains it i.e in case of multilevel inheritance, ``None`` for - local columns. - """ - __slots__ = ['name', 'column', 'parent_model', 'parent_column', 'original_parent'] - - def __init__(self, name, column, parent_model=None, parent_column=None, original_parent=None): - self.name = name - self.column = column - self.parent_model = parent_model - self.parent_column = parent_column - self.original_parent = original_parent - - def __str__(self): - return '%s(%s, %s, %s, %s, %s)' % ( - self.__class__.__name__, self.name, self.column, - self.parent_model, self.parent_column, self.original_parent) |
