construction_work.py 661 B

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. from openerp import models, fields, tools, api
  3. class constructionWork(models.Model):
  4. _name = 'construction.work'
  5. name = fields.Char('name', required=True)
  6. active = fields.Boolean('Active', default=True)
  7. ref = fields.Char('Ref')
  8. partner_id = fields.Many2one('res.partner', string='owner', help='owner of the work')
  9. work_street = fields.Char('street')
  10. work_city = fields.Char('city')
  11. comment = fields.Text('Comment', help='information')
  12. ''' RES PARTNER '''
  13. class ResPartnerWorks(models.Model):
  14. _inherit = 'res.partner'
  15. works = fields.One2many('construction.work', 'partner_id', string='work')