Files
Odoo-Modules/fusion_claims/models/res_partner.py
Nexa Admin 431052920e feat: separate fusion field service and LTC into standalone modules, update core modules
- fusion_claims: separated field service logic, updated controllers/views
- fusion_tasks: updated task views and map integration
- fusion_authorizer_portal: added page 11 signing, schedule booking, migrations
- fusion_shipping: new standalone shipping module (Canada Post, FedEx, DHL, Purolator)
- fusion_ltc_management: new standalone LTC management module
2026-03-11 16:19:52 +00:00

76 lines
2.6 KiB
Python

# -*- coding: utf-8 -*-
# Copyright 2024-2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
from odoo import models, fields, api
class ResPartner(models.Model):
_inherit = 'res.partner'
# ==========================================================================
# CONTACT TYPE
# ==========================================================================
x_fc_contact_type = fields.Selection(
selection=[
('adp_customer', 'ADP Customer'),
('adp_odsp_customer', 'ADP-ODSP Customer'),
('odsp_customer', 'ODSP Customer'),
('mod_customer', 'MOD Customer'),
('private_customer', 'Private Customer'),
('wsib_customer', 'WSIB Customer'),
('acsd_customer', 'ACSD Customer'),
('private_insurance', 'Private Insurance'),
('adp_agent', 'ADP Agent'),
('odsp_agent', 'ODSP Agent'),
('muscular_dystrophy', 'Muscular Dystrophy'),
('occupational_therapist', 'Occupational Therapist'),
('physiotherapist', 'Physiotherapist'),
('vendor', 'Vendor'),
('funding_agency', 'Funding Agency'),
('government_agency', 'Government Agency'),
('company_contact', 'Company Contact'),
('long_term_care_home', 'Long Term Care Home'),
('retirement_home', 'Retirement Home'),
('odsp_office', 'ODSP Office'),
('other', 'Other'),
],
string='Contact Type',
tracking=True,
index=True,
)
# ==========================================================================
# ODSP FIELDS
# ==========================================================================
x_fc_odsp_member_id = fields.Char(
string='ODSP Member ID',
size=9,
tracking=True,
help='9-digit Ontario Disability Support Program Member ID',
)
x_fc_case_worker_id = fields.Many2one(
'res.partner',
string='ODSP Case Worker',
tracking=True,
help='ODSP Case Worker assigned to this client',
)
x_fc_date_of_birth = fields.Date(
string='Date of Birth',
tracking=True,
)
x_fc_healthcard_number = fields.Char(
string='Healthcard Number',
tracking=True,
)
x_fc_is_odsp_office = fields.Boolean(
compute='_compute_is_odsp_office',
string='Is ODSP Office',
store=True,
)
@api.depends('x_fc_contact_type')
def _compute_is_odsp_office(self):
for partner in self:
partner.x_fc_is_odsp_office = partner.x_fc_contact_type == 'odsp_office'