# -*- coding: utf-8 -*-

from odoo import api, fields, models, _

class ProjectMainenenceType(models.Model):
    _name = 'project.maintenance.type'
    _description = "project Maintenance Type"

    name = fields.Char('Maintenance Type', required=True)
    maintenance_ids = fields.One2many('project.maintenance', 'maintenance_type_id', string='Maintenance', copy=False)

class ProjectMainenence(models.Model):
    _name = 'project.maintenance'
    _description = "project Maintenance"

    name = fields.Char('Maintenance', required=True)
    maintenance_type_id = fields.Many2one('project.maintenance.type', 'Manintenance Type', required=True, readonly=True, ondelete='cascade')




