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.


Why _rec_name is not working in v9 ?

Anabela Damas
on 1/25/16, 12:31 PM 311 views


I've created a new class like this: 

class vi_unavailability(models.Model):

_name = 'vi.unavailability'

_order = 'date_unavailable'

_rec_name = 'date_unavailable'

_description = u"Unavailability"

date_unavailable = fields.Date(string='Date Unavailable',required=True)

vi_product_id = fields.Many2one(comodel_name='product.template', string='Product')

But in log file I'm always getting this warning: 

vi.unavailability.read() with unknown field 'name'

Is this normal?

I'm new in v9 ... 

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: 1/25/16, 12:31 PM
Seen: 311 times
Last updated: 1/25/16, 12:31 PM