Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Translation of tracked fields in openerp 7

Alexei R. Acosta
on 9/19/14, 11:40 AM 999 views

I'm developing a custom module. In some models I have some tracked fields by using "_track_visibility" option and state field by using "_track" option. When a new object is created tracked fields are shown properly translated, but when I change state field value to confirmed, then tracked fields are shown in English and not as I was expecting translated to Spanish.

What's the problem here? I'm doing something wrong? Is this problem fixed in Odoo v8? There is some parts of my code:

class death(osv.osv): _name = 'death.death' _description = _("Death Record") _rec_name = 'date' _inherit = ['mail.thread', 'ir.needaction_mixin'] _track = { 'state': { 'animal_health_and_biosafety.mt_death_confirmation': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['confirmed'] }, } columns = { 'date': fields.date('Date', required=True, readonly=False, states={'confirmed': [('readonly', True)]}), 'cause_id': fields.many2one('death.cause', string='Cause', help='Death cause', readonly=False, states={'confirmed': [('readonly',True)]}, track_visibility='always'), 'amount': fields.function(_amount, type='integer', string='Amount', multi="amount", help="Number of dead animals", track_visibility='always'), 'note': fields.text('Description', readonly=False, states={'confirmed': [('readonly', True)]}), 'state': fields.selection([('unconfirmed', 'Unconfirmed'), ('confirmed', 'Confirmed')], 'State', required=True, help="Status"), }

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 9/19/14, 11:40 AM
Seen: 999 times
Last updated: 3/16/15, 8:10 AM