From 30b6eea12d8df70bde2e9a396946e1a712bd6974 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 30 Oct 2013 12:13:03 +0100 Subject: [PATCH] [FIX] l10n_multilang: remove force_write attribute in process_translations When processing a translation, the module used to replace the original term by the translated value for accounts (only object with force_write=True). This lead to only having the translated version for every user, independent of user's language. On new chart of accounts, will have different account names according to the user preference. Keep argument force_write in API for stability reason (will be removed in trunk) bzr revid: mat@openerp.com-20131030111303-ziusplk330oj9wf4 --- addons/l10n_multilang/l10n_multilang.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/addons/l10n_multilang/l10n_multilang.py b/addons/l10n_multilang/l10n_multilang.py index 9596b29..a44c9f8 100644 --- a/addons/l10n_multilang/l10n_multilang.py +++ b/addons/l10n_multilang/l10n_multilang.py @@ -65,20 +65,15 @@ class wizard_multi_charts_accounts(osv.osv_memory): for j in range(len(in_ids)): in_id = in_ids[j] if value[in_id]: - if not force_write: - #copy Translation from Source to Destination object - xlat_obj.create(cr, uid, { - 'name': out_obj._name + ',' + in_field, - 'type': 'model', - 'res_id': out_ids[j], - 'lang': lang, - 'src': src[in_id], - 'value': value[in_id], + #copy Translation from Source to Destination object + xlat_obj.create(cr, uid, { + 'name': out_obj._name + ',' + in_field, + 'type': 'model', + 'res_id': out_ids[j], + 'lang': lang, + 'src': src[in_id], + 'value': value[in_id], }) - else: - #replace the value in the destination object only if it's the user lang - if context.get('lang') == lang: - self.pool.get(out_obj._name).write(cr, uid, out_ids[j], {in_field: value[in_id]}) else: _logger.info('Language: %s. Translation from template: there is no translation available for %s!' %(lang, src[in_id]))#out_obj._name)) return True -- 1.7.10.4