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