96 lines
2.5 KiB
Python
96 lines
2.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
# Part of the Fusion Plating product family.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class FpJhscMeeting(models.Model):
|
|
"""A scheduled or held JHSC meeting.
|
|
|
|
Captures the meeting's date, attendees, agenda, minutes, action items
|
|
and supporting attachments. The state field walks the meeting through
|
|
its lifecycle from planned through closed so the JHSC can audit which
|
|
meetings still need minutes posted.
|
|
"""
|
|
_name = 'fusion.plating.jhsc.meeting'
|
|
_description = 'Fusion Plating — JHSC Meeting'
|
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
|
_order = 'meeting_date desc, id desc'
|
|
_rec_name = 'name'
|
|
|
|
name = fields.Char(
|
|
string='Subject',
|
|
required=True,
|
|
tracking=True,
|
|
)
|
|
jhsc_id = fields.Many2one(
|
|
'fusion.plating.jhsc',
|
|
string='Committee',
|
|
required=True,
|
|
ondelete='cascade',
|
|
tracking=True,
|
|
)
|
|
facility_id = fields.Many2one(
|
|
'fusion.plating.facility',
|
|
related='jhsc_id.facility_id',
|
|
store=True,
|
|
readonly=True,
|
|
)
|
|
meeting_date = fields.Date(
|
|
string='Meeting Date',
|
|
required=True,
|
|
default=fields.Date.context_today,
|
|
tracking=True,
|
|
)
|
|
attendee_ids = fields.Many2many(
|
|
'hr.employee',
|
|
'fp_jhsc_meeting_attendee_rel',
|
|
'meeting_id',
|
|
'employee_id',
|
|
string='Attendees',
|
|
)
|
|
agenda = fields.Html(
|
|
string='Agenda',
|
|
)
|
|
minutes = fields.Html(
|
|
string='Minutes',
|
|
)
|
|
action_items = fields.Html(
|
|
string='Action Items',
|
|
)
|
|
state = fields.Selection(
|
|
[
|
|
('planned', 'Planned'),
|
|
('held', 'Held'),
|
|
('minutes_ready', 'Minutes Ready'),
|
|
('closed', 'Closed'),
|
|
],
|
|
string='Status',
|
|
default='planned',
|
|
tracking=True,
|
|
required=True,
|
|
)
|
|
attachment_ids = fields.Many2many(
|
|
'ir.attachment',
|
|
'fp_jhsc_meeting_attachment_rel',
|
|
'meeting_id',
|
|
'attachment_id',
|
|
string='Attachments',
|
|
)
|
|
company_id = fields.Many2one(
|
|
'res.company',
|
|
string='Company',
|
|
default=lambda self: self.env.company,
|
|
)
|
|
|
|
def action_mark_held(self):
|
|
self.write({'state': 'held'})
|
|
|
|
def action_post_minutes(self):
|
|
self.write({'state': 'minutes_ready'})
|
|
|
|
def action_close(self):
|
|
self.write({'state': 'closed'})
|