1 # -*- coding: utf-8 -*-
2 from osv
import fields
, osv
5 class Studies(osv
.osv
):
6 _name
= 'bikecoop.studies'
7 _description
= 'If partner is student, what is his school.'
10 'code': fields
.char('Code', size
=8, help='Code of the school'),
11 'name': fields
.char('Name', size
=128, help='Name of the school.', required
=True),
12 'active': fields
.boolean('Active', help='If check, this object is always available'),
16 'active': lambda *a
: 1,
22 class Partner(osv
.osv
):
23 _inherit
= 'res.partner'
26 'studies_id': fields
.many2one('bikecoop.studies', 'School', help='If partner is student, school where he is studing.'),
30 'studies_id': lambda *a
: 1,
35 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: