diff --git a/doc/ref/models/fields.rst b/doc/ref/models/fields.rst index d69afe8d7f..a7af4894e0 100644 --- a/doc/ref/models/fields.rst +++ b/doc/ref/models/fields.rst @@ -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() diff --git a/trytond/model/fields/many2many.py b/trytond/model/fields/many2many.py index 9124062cc0..46f4da542a 100644 --- a/trytond/model/fields/many2many.py +++ b/trytond/model/fields/many2many.py @@ -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.