Tags

,


from openerp.osv import osv,fields

class vetclinic_animal(osv.osv):
    _name = "vetclinic.animal"
    _columns = {
        'name' : fields.char('Name', size=64),
        'birthdate' : fields.date('Birth Date'),
        'classification_id':fields.many2one('vetclinic.classification','Classification'),
        'breed_id':fields.many2one('vetclinic.breed','Breed'),
        'labels_ids':fields.many2many('vetclinic.labels','rel_animal_labels','animal_id','labels_id',"Label"),
        'history':fields.text("History"),
        'address':fields.text("Address"),
        'owners': fields.one2many('res.partner', 'animal_id', 'Employee'),
    }
 
class vetclinic_classification(osv.osv):
    _name="vetclinic.classification"
    _columns={
        'name': fields.char('Name', size=64),
    }
    
class vetclinic_breed(osv.osv):
    _name="vetclinic.breed"
    _columns={
        'name': fields.char('Name', size=64),
    }
    
class vetclinic_labels(osv.osv):
    _name="vetclinic.labels"
    _columns={
        'name': fields.char('Name', size=64),
    }
    
class vetclinic_partner(osv.osv):
    _inherit="res.partner"
    _columns={
        'animal_id':fields.many2one('vetclinic.animal',string="Quotations"),
    }
Advertisements