diff --git a/doc/changelog.rst b/doc/changelog.rst
index ce639d2d3c8..eadfe81b5e8 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -31,5 +31,15 @@ Changelog
``openerp.exceptions.RedirectWarning``.
- Give a pair of new methods to ``res.config.settings`` and a helper to make
them easier to use: ``get_config_warning()``.
-- Path to webkit report files (field ``report_file``) must be writen with the
- Unix way (with ``/`` and not ``\``)
\ No newline at end of file
+- Path to webkit report files (field ``report_file``) must be written the
+ Unix way (with ``/`` and not ``\``)
+
+
+`7.0`
+-----
+
+- Modules may now include an ``i18n_extra`` directory that will be treated like the
+ default ``i18n`` directory. This is typically useful for manual translation files
+ that are not managed by Launchpad's translation system. An example is l10n modules
+ that depend on ``l10n_multilang``.
+
diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py
index 7eb4f5ecd94..3b709934a27 100644
--- a/openerp/addons/base/ir/ir_model.py
+++ b/openerp/addons/base/ir/ir_model.py
@@ -195,7 +195,8 @@ class ir_model(osv.osv):
ctx = dict(context,
field_name=vals['name'],
field_state='manual',
- select=vals.get('select_level', '0'))
+ select=vals.get('select_level', '0'),
+ update_custom_fields=True)
self.pool[vals['model']]._auto_init(cr, ctx)
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
return res
diff --git a/openerp/addons/base/ir/ir_translation.py b/openerp/addons/base/ir/ir_translation.py
index acb6daa7785..0f9b6ea3886 100644
--- a/openerp/addons/base/ir/ir_translation.py
+++ b/openerp/addons/base/ir/ir_translation.py
@@ -445,6 +445,13 @@ class ir_translation(osv.osv):
tools.trans_load(cr, base_trans_file, lang, verbose=False, module_name=module_name, context=context)
context['overwrite'] = True # make sure the requested translation will override the base terms later
+ # i18n_extra folder is for additional translations handle manually (eg: for l10n_be)
+ base_trans_extra_file = openerp.modules.get_module_resource(module_name, 'i18n_extra', base_lang_code + '.po')
+ if base_trans_extra_file:
+ _logger.info('module %s: loading extra base translation file %s for language %s', module_name, base_lang_code, lang)
+ tools.trans_load(cr, base_trans_extra_file, lang, verbose=False, module_name=module_name, context=context)
+ context['overwrite'] = True # make sure the requested translation will override the base terms later
+
# Step 2: then load the main translation file, possibly overriding the terms coming from the base language
trans_file = openerp.modules.get_module_resource(module_name, 'i18n', lang_code + '.po')
if trans_file:
@@ -452,6 +459,11 @@ class ir_translation(osv.osv):
tools.trans_load(cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
elif lang_code != 'en_US':
_logger.warning('module %s: no translation for language %s', module_name, lang_code)
+
+ trans_extra_file = openerp.modules.get_module_resource(module_name, 'i18n_extra', lang_code + '.po')
+ if trans_extra_file:
+ _logger.info('module %s: loading extra translation file (%s) for language %s', module_name, lang_code, lang)
+ tools.trans_load(cr, trans_extra_file, lang, verbose=False, module_name=module_name, context=context)
return True
diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py
index 73530a122ad..9699545ddf5 100644
--- a/openerp/addons/base/ir/ir_ui_view.py
+++ b/openerp/addons/base/ir/ir_ui_view.py
@@ -187,7 +187,7 @@ class view(osv.osv):
if self.pool._init:
# Module init currently in progress, only consider views from modules whose code was already loaded
query = """SELECT v.id FROM ir_ui_view v LEFT JOIN ir_model_data md ON (md.model = 'ir.ui.view' AND md.res_id = v.id)
- WHERE v.inherit_id=%s AND v.model=%s AND md.module in %s
+ WHERE v.inherit_id=%s AND v.model=%s AND (md.module IS NULL or md.module in %s)
ORDER BY priority"""
query_params = (view_id, model, tuple(self.pool._init_modules))
else:
diff --git a/openerp/addons/base/res/res_currency.py b/openerp/addons/base/res/res_currency.py
index efe33f32fd9..a496a1eccdf 100644
--- a/openerp/addons/base/res/res_currency.py
+++ b/openerp/addons/base/res/res_currency.py
@@ -30,11 +30,13 @@ from openerp.tools.translate import _
CURRENCY_DISPLAY_PATTERN = re.compile(r'(\w+)\s*(?:\((.*)\))?')
class res_currency(osv.osv):
-
def _current_rate(self, cr, uid, ids, name, arg, context=None):
- return self._get_current_rate(cr, uid, ids, name, arg, context=context)
+ return self._get_current_rate(cr, uid, ids, context=context)
- def _get_current_rate(self, cr, uid, ids, name, arg, context=None):
+ def _current_rate_silent(self, cr, uid, ids, name, arg, context=None):
+ return self._get_current_rate(cr, uid, ids, raise_on_no_rate=False, context=context)
+
+ def _get_current_rate(self, cr, uid, ids, raise_on_no_rate=True, context=None):
if context is None:
context = {}
res = {}
@@ -52,9 +54,12 @@ class res_currency(osv.osv):
if cr.rowcount:
id, rate = cr.fetchall()[0]
res[id] = rate
+ elif not raise_on_no_rate:
+ res[id] = 0
else:
raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id)))
return res
+
_name = "res.currency"
_description = "Currency"
_columns = {
@@ -63,6 +68,10 @@ class res_currency(osv.osv):
'symbol': fields.char('Symbol', size=4, help="Currency sign, to be used when printing amounts."),
'rate': fields.function(_current_rate, string='Current Rate', digits=(12,6),
help='The rate of the currency to the currency of rate 1.'),
+
+ # Do not use for computation ! Same as rate field with silent failing
+ 'rate_silent': fields.function(_current_rate_silent, string='Current Rate', digits=(12,6),
+ help='The rate of the currency to the currency of rate 1 (0 if no rate defined).'),
'rate_ids': fields.one2many('res.currency.rate', 'currency_id', 'Rates'),
'accuracy': fields.integer('Computational Accuracy'),
'rounding': fields.float('Rounding Factor', digits=(12,6)),
diff --git a/openerp/addons/base/res/res_currency_view.xml b/openerp/addons/base/res/res_currency_view.xml
index 907eec866fb..c74b677ea72 100644
--- a/openerp/addons/base/res/res_currency_view.xml
+++ b/openerp/addons/base/res/res_currency_view.xml
@@ -22,7 +22,7 @@