This question has been flagged
2266 Views

I'm learning odoo programming from the veterinarian clinic example.  

The python code goes as following.

class vetclinic_animal(osv.Model):
    _name = "vetclinic.animal"
    _columns = {
        'name': fields.char('Name', size=64),
        'birthdate': fields.date('Birth Date'),
        'breed_id':fields.many2one('vetclinic.breed','Breed'),
        'classification_id': fields.many2one('vetclinic.classification','Classification'),
        'labels_ids':fields.many2many('vetclinic.labels','rel_animal_labels','animal_id','labels_id',string='Labels'),      

}

The problem looks like is with 'labels_ids', when I install this module on my Odoo the field for  'labels_ids'  ('Labels) does not show up in the form. However if I change that part of the code to:

        'labels_ids':fieldsfields.many2one('vetclinic.labels','Labels'),

It show up as expected in a many2one field. 

So, what's wrong with my code?

Thanks

Avatar
Discard