# -*- coding: utf-8 -*- ############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies(). # Author: Jumana Haseen @cybrosys(odoo@cybrosys.com) # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. # # 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. # # You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE # (AGPL v3) along with this program. # If not, see . # ############################################################################# from odoo import fields, models class PolicyDetails(models.Model): """This class creates a model 'policy.details' and added fields """ _name = 'policy.details' _description = "Policy Details" name = fields.Char(string='Name', required=True, help="Give the policy name") policy_type_id = fields.Many2one( 'policy.type', string='Policy Type', required=True, help="Select the policy type") payment_type_ids = fields.Many2many('payment.type', help="Select the policy types") currency_id = fields.Many2one( 'res.currency', string='Currency', required=True, default=lambda self: self.env.user.company_id.currency_id.id, help="Select the currency") amount = fields.Monetary(string='Amount', required=True, help="Give the amount for the policy") note_field = fields.Html(string='Comment', help="Specify the comments")