[FIX] files filtering when loading... stuff.

also, cleanup module file (remove extra imports, extra default key in manifest)

bzr revid: xmo@openerp.com-20121024105454-nqw9taxladjofz2v
This commit is contained in:
Xavier Morel 2012-10-24 12:54:54 +02:00
parent 7501a8b9ad
commit f579cc927f
2 changed files with 4 additions and 11 deletions

View File

@ -113,6 +113,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
if kind in ('demo', 'demo_xml'):
noupdate = True
try:
ext = ext.lower()
if ext == '.csv':
if kind in ('init', 'init_xml'):
noupdate = True
@ -121,8 +122,10 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
process_sql_file(cr, fp)
elif ext == '.yml':
tools.convert_yaml_import(cr, module_name, fp, kind, idref, mode, noupdate, report)
else:
elif ext == '.xml':
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
else:
_logger.debug("Ignoring %s due to unknown type", filename)
finally:
fp.close()

View File

@ -28,15 +28,9 @@ import sys
import types
import zipimport
import openerp
import openerp.osv as osv
import openerp.tools as tools
import openerp.tools.osutil as osutil
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.translate import _
import openerp.netsvc as netsvc
import zipfile
import openerp.release as release
@ -48,9 +42,6 @@ from cStringIO import StringIO
import logging
import openerp.modules.db
import openerp.modules.graph
_logger = logging.getLogger(__name__)
_ad = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons') # default addons path (base)
@ -335,7 +326,6 @@ def load_information_from_description_file(module):
'description': '',
'icon': get_module_icon(module),
'installable': True,
'auto_install': False,
'license': 'AGPL-3',
'name': False,
'post_load': None,