[MERGE] forward port of branch saas-1 up to revid 4918 chs@openerp.com-20131114134731...
authorChristophe Simonis <chs@openerp.com>
Thu, 14 Nov 2013 13:55:02 +0000 (14:55 +0100)
committerChristophe Simonis <chs@openerp.com>
Thu, 14 Nov 2013 13:55:02 +0000 (14:55 +0100)
bzr revid: chs@openerp.com-20131114135502-xqi6df3jzm7ng0io

1  2 
openerp/osv/orm.py
openerpcommand/common.py

Simple merge
@@@ -40,10 -40,7 +40,9 @@@ def get_addons_from_paths(paths, exclud
      module_names = []
      for p in paths:
          if os.path.exists(p):
-             names = list(set(os.listdir(p)))
-             names = filter(lambda a: not (a.startswith('.') or a in exclude), names)
+             names = [n for n in os.listdir(p) if os.path.isfile(os.path.join(p, n, '__openerp__.py')) and not n.startswith('.') and n not in exclude]
 +            names = filter(lambda a: os.path.isdir(os.path.join(p, a)), names)
 +            names = filter(lambda a: os.path.exists(os.path.join(p, a, '__openerp__.py')), names)
              module_names.extend(names)
          else:
              print "The addons path `%s` doesn't exist." % p