[MERGE] remote module import
bzr revid: fme@openerp.com-20140327140516-t7yrma5z2ipm4gnd
This commit is contained in:
+1
-1
@@ -1094,7 +1094,7 @@ class Root(object):
|
||||
return self.dispatch(environ, start_response)
|
||||
|
||||
def load_addons(self):
|
||||
""" Load all addons from addons patch containg static files and
|
||||
""" Load all addons from addons path containing static files and
|
||||
controllers and configure them. """
|
||||
# TODO should we move this to ir.http so that only configured modules are served ?
|
||||
statics = {}
|
||||
|
||||
@@ -169,13 +169,15 @@ def get_module_icon(module):
|
||||
return ('/' + module + '/') + '/'.join(iconpath)
|
||||
return '/base/' + '/'.join(iconpath)
|
||||
|
||||
def load_information_from_description_file(module):
|
||||
def load_information_from_description_file(module, mod_path=None):
|
||||
"""
|
||||
:param module: The name of the module (sale, purchase, ...)
|
||||
:param mod_path: Physical path of module, if not providedThe name of the module (sale, purchase, ...)
|
||||
"""
|
||||
|
||||
terp_file = get_module_resource(module, '__openerp__.py')
|
||||
mod_path = get_module_path(module)
|
||||
if not mod_path:
|
||||
mod_path = get_module_path(module)
|
||||
terp_file = opj(mod_path, '__openerp__.py')
|
||||
if terp_file:
|
||||
info = {}
|
||||
if os.path.isfile(terp_file):
|
||||
|
||||
@@ -857,12 +857,12 @@ form: module.record_id""" % (xml_id,)
|
||||
def _tag_template(self, cr, el, data_node=None):
|
||||
# This helper transforms a <template> element into a <record> and forwards it
|
||||
tpl_id = el.get('id', el.get('t-name', '')).encode('ascii')
|
||||
module = self.module
|
||||
if '.' in tpl_id:
|
||||
module, tpl_id = tpl_id.split('.', 1)
|
||||
full_tpl_id = tpl_id
|
||||
if '.' not in full_tpl_id:
|
||||
full_tpl_id = '%s.%s' % (self.module, tpl_id)
|
||||
# set the full template name for qweb <module>.<id>
|
||||
if not (el.get('inherit_id') or el.get('inherit_option_id')):
|
||||
el.set('t-name', '%s.%s' % (module, tpl_id))
|
||||
el.set('t-name', full_tpl_id)
|
||||
el.tag = 't'
|
||||
else:
|
||||
el.tag = 'data'
|
||||
@@ -952,8 +952,9 @@ form: module.record_id""" % (xml_id,)
|
||||
'url': self._tag_url
|
||||
}
|
||||
|
||||
def convert_file(cr, module, filename, idref, mode='update', noupdate=False, kind=None, report=None):
|
||||
pathname = os.path.join(module, filename)
|
||||
def convert_file(cr, module, filename, idref, mode='update', noupdate=False, kind=None, report=None, pathname=None):
|
||||
if pathname is None:
|
||||
pathname = os.path.join(module, filename)
|
||||
fp = misc.file_open(pathname)
|
||||
ext = os.path.splitext(filename)[1].lower()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user