from odoo import models, fields, api



class SOS_installation_report(models.Model):
    _name = 'sos_installation_report'
    _description = 'Installation Report'
    _rec_name = 'plan_id'
    _order = 'id desc'

    plan_id = fields.Many2one('sos_travel_plan',string="Plan Id",required= True)
    customer_name = fields.Many2one('sos_inventory_customers',string="Customer Name",related="plan_id.customer_name")
    customer_location = fields.Char(string="Customer Location",related="plan_id.customer_location")
    installation_doc = fields.Binary(string="Installation Document")
    installation_doc_filename=fields.Char(string="Installation Document File Name")
    remarks = fields.Html(string="Remarks")
    status = fields.Selection([('completed','Completed'),('pending','Pending')],string='Status')
   