diff options
| author | Olivier Dony <odo@openerp.com> | 2011-10-03 15:26:53 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2011-10-03 15:26:53 +0200 |
| commit | f4ffbd79f417c6445b630a5a33979321dba67cc0 (patch) | |
| tree | 361df99a42a37ff5148234b807d831e10e7cd8aa | |
| parent | 1e50dac2b8ae3c9f5a0227a0aed27d40092232de (diff) | |
[IMP] field.m2m: better doc for auto-named m2m relationships
bzr revid: odo@openerp.com-20111003132653-413c41exoj64q416
| -rw-r--r-- | openerp/osv/fields.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 0d60a1cbb95..9b437de86e4 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -495,6 +495,15 @@ class one2many(_column): class many2many(_column): """Encapsulates the logic of a many-to-many bidirectional relationship, handling the low-level details of the intermediary relationship table transparently. + A many-to-many relationship is always symmetrical, and can be declared and accessed + from either endpoint model. + If ``rel`` (relationship table name), ``id1`` (source foreign key column name) + or id2 (destination foreign key column name) are not specified, the system will + provide default values. This will by default only allow one single symmetrical + many-to-many relationship between the source and destination model. + For multiple many-to-many relationship between the same models and for + relationships where source and destination models are the same, ``rel``, ``id1`` + and ``id2`` should be specified explicitly. :param str obj: destination model :param str rel: optional name of the intermediary relationship table. If not specified, |
