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
for j in range(len(in_ids)):
in_id = in_ids[j]
if value[in_id]:
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
else:
_logger.info('Language: %s. Translation from template: there is no translation available for %s!' %(lang, src[in_id]))#out_obj._name))
return True