# -*- coding: utf-8 -*- from openerp import models, fields, tools, api class constructionWork(models.Model): _name = 'construction.work' name = fields.Char('name', required=True) active = fields.Boolean('Active', default=True) ref = fields.Char('Ref') partner_id = fields.Many2one('res.partner', string='owner', help='owner of the work') work_street = fields.Char('street') work_city = fields.Char('city') comment = fields.Text('Comment', help='information') ''' RES PARTNER ''' class ResPartnerWorks(models.Model): _inherit = 'res.partner' works = fields.One2many('construction.work', 'partner_id', string='work')