# -*- coding: utf-8 -*-
###############################################################################
#
#    Tech-Receptives Solutions Pvt. Ltd.
#    Copyright (C) 2009-TODAY Tech-Receptives(<http://www.techreceptives.com>).
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Lesser General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Lesser General Public License for more details.
#
#    You should have received a copy of the GNU Lesser General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################

from odoo.osv import expression
from odoo.tools.float_utils import float_round as round
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from odoo.exceptions import UserError, ValidationError
from odoo import api, fields, models, _


class EtourismGuide(models.Model):
    _name = 'etourism.guide'
    _inherits = {'res.partner': 'partner_id'}
    _description = "Guide"

    #name = fields.Char(string='Name', required=True)
    country_id = fields.Many2one('ecom.location', 'Country', track_visibility='onchange')
    island_id = fields.Many2one('ecom.location', 'Island', track_visibility='onchange')
    county_id = fields.Many2one('ecom.location', 'County', track_visibility='onchange')
    parish_id = fields.Many2one('ecom.location', 'Parish', track_visibility='onchange')
    birth_date = fields.Date(string='Date of Birth')
    years_experience = fields.Integer(string='Years of experience')
    services = fields.Char(string='Services', size=2000)
    qualifications = fields.Char(string='Qualifications', size=255)
    nationality = fields.Many2one('ecom.location', 'Nationality', track_visibility='onchange')
    doc_number = fields.Char(string='ID Number', size=255)
    marital_status = fields.Selection([('Single', 'Single'),
                              ('Married', 'Married'),
                              ('Widow', 'Widow'),
                              ('Divorced', 'Divorced'),
                              ], 'Marital Status', default='Single', track_visibility='onchange',translate=True)
    partner_id = fields.Many2one(
        'res.partner', 'Partner', required=True, ondelete="cascade", track_visibility='onchange')
    training_line = fields.One2many('etourism.training', 'guide_id', string="Training(s)")
    license_line = fields.One2many('etourism.license', 'guide_id', string="License(s)")

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
