Odoo Help

0

Why _rec_name is not working in v9 ?

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

Hi, 


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 ... 
Thanks 

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/25/16, 12:31 PM
Seen: 599 times
Last updated: 1/25/16, 12:31 PM