44 lines
1.4 KiB
Python
44 lines
1.4 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.
|
|
#
|
|
# Sub 12 Phase B — quality team.
|
|
#
|
|
# Dedicated team model rather than reusing res.groups, per Sub 12 locked
|
|
# decision: teams need their own kanban grouping + per-team escalation
|
|
# chains.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class FpQualityTeam(models.Model):
|
|
_name = 'fp.quality.team'
|
|
_description = 'Fusion Plating — Quality Team'
|
|
_order = 'sequence, name'
|
|
_inherit = ['mail.thread']
|
|
|
|
name = fields.Char(required=True, tracking=True, translate=True)
|
|
sequence = fields.Integer(default=10)
|
|
color = fields.Integer(string='Colour Index', default=0)
|
|
description = fields.Text(translate=True)
|
|
lead_user_id = fields.Many2one(
|
|
'res.users', string='Team Lead',
|
|
tracking=True,
|
|
help='Owns escalations and weekly review of open NCRs/RMAs.',
|
|
)
|
|
member_ids = fields.Many2many(
|
|
'res.users', 'fp_quality_team_user_rel', 'team_id', 'user_id',
|
|
string='Members',
|
|
)
|
|
escalation_user_id = fields.Many2one(
|
|
'res.users', string='Escalation Manager',
|
|
tracking=True,
|
|
help='Notified when team owns a record that misses its deadline.',
|
|
)
|
|
active = fields.Boolean(default=True)
|
|
|
|
_sql_constraints = [
|
|
('name_uniq', 'unique(name)', 'A team with that name already exists.'),
|
|
]
|