Add add_remove alias on Many2Many for compatibility with One2Many

issue4112
review5511002
This commit is contained in:
Cédric Krier committed 2014-09-01 12:53:32 +02:00
1 parent 349fc51a7f
commit 6765a12e5a
2 files changed
+8

No files matched your search

+4
View File
@@ -611,6 +611,10 @@ This field accepts as written value a list of tuples like the :class:`One2Many`.
An integer or a PYSON expression denoting the maximum number of records
allowed in the relation.
.. attribute:: Many2Many.add_remove
An alias to the :attr:`domain` for compatibility with the :class:`One2Many`.
Instance methods:
.. method:: Many2Many.get_target()
+4
View File
@@ -58,6 +58,10 @@ class Many2Many(Field):
size = property(_get_size, _set_size)
@property
def add_remove(self):
return self.domain
def get(self, ids, model, name, values=None):
'''
Return target records ordered.