2017-11-03 15:28:45 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
""" Coworker module """
|
|
|
|
|
|
|
|
from odoo import models, fields
|
|
|
|
|
|
|
|
class Coworker(models.Model):
|
|
|
|
""" Coworker model """
|
|
|
|
_name = 'coworking.coworker'
|
|
|
|
_description = 'Coworker model definition'
|
2017-11-06 14:35:02 +01:00
|
|
|
_order = 'id desc'
|
2017-11-03 15:28:45 +01:00
|
|
|
|
|
|
|
name = fields.Char(required=True)
|
|
|
|
firstname = fields.Char('First name', required=True)
|
|
|
|
coworker_type = fields.Selection([('staffer', 'Staffer'),
|
|
|
|
('worker', 'Worker'), ('member', 'Member'),
|
|
|
|
('volunteer', 'Volunteer'),
|
|
|
|
('visitor', 'Visitor')])
|
|
|
|
company_name = fields.Char('Company')
|
|
|
|
job = fields.Char()
|
2017-11-06 12:49:45 +01:00
|
|
|
contact_date = fields.Date()
|
2017-11-03 15:28:45 +01:00
|
|
|
street = fields.Char()
|
|
|
|
postal_code = fields.Char()
|
|
|
|
city = fields.Char()
|
|
|
|
phone_number = fields.Char()
|
|
|
|
gsm = fields.Char('GSM')
|
|
|
|
email = fields.Char()
|
|
|
|
url = fields.Char('URL')
|
|
|
|
note = fields.Text()
|
|
|
|
|
|
|
|
is_done = fields.Boolean('Done?')
|
|
|
|
is_active = fields.Boolean('Active?', default=True)
|