diff --git a/bin/osv/fields.py b/bin/osv/fields.py index e03f76b3541..5a56130985e 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -478,6 +478,9 @@ class many2many(_column): def __init__(self, obj, rel, id1, id2, string='unknown', limit=None, **args): _column.__init__(self, string=string, **args) self._obj = obj + if '.' in rel: + raise Exception(_('The second argument of the many2many field %s must be a SQL table !'\ + 'You used %s, which is not a valid SQL table name.')% (string,rel)) self._rel = rel self._id1 = id1 self._id2 = id2