39 lines
1.5 KiB
Python
39 lines
1.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 FpReceivingDamage(models.Model):
|
|
"""Damage log entry on a receiving record.
|
|
|
|
Documents condition issues found during parts inspection:
|
|
severity, photos, required action, and customer follow-up.
|
|
"""
|
|
_name = 'fp.receiving.damage'
|
|
_description = 'Fusion Plating — Receiving Damage'
|
|
_order = 'id'
|
|
|
|
receiving_id = fields.Many2one(
|
|
'fp.receiving', string='Receiving', required=True, ondelete='cascade',
|
|
)
|
|
description = fields.Text(string='Description', required=True, help='What is damaged.')
|
|
severity = fields.Selection(
|
|
[('cosmetic', 'Cosmetic'), ('functional', 'Functional'), ('rejected', 'Rejected')],
|
|
string='Severity', required=True, default='cosmetic',
|
|
)
|
|
photo_ids = fields.Many2many(
|
|
'ir.attachment', 'fp_receiving_damage_photo_rel', 'damage_id', 'attachment_id',
|
|
string='Photos',
|
|
)
|
|
action_required = fields.Selection(
|
|
[('none', 'None'), ('notify_customer', 'Notify Customer'),
|
|
('return_parts', 'Return Parts'), ('proceed_as_is', 'Proceed As-Is')],
|
|
string='Action Required', default='none',
|
|
)
|
|
customer_notified = fields.Boolean(string='Customer Notified')
|
|
customer_response = fields.Text(string='Customer Response')
|
|
resolved = fields.Boolean(string='Resolved')
|