From 13f80770c9c447202949a01ce950b23f4e16a9fa Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 29 Oct 2008 00:33:20 +0100 Subject: [PATCH] improve bzr revid: fp@tinyerp.com-20081028233320-c8k4xixc543w8te5 --- bin/osv/fields.py | 3 +++ 1 file changed, 3 insertions(+) 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