feat(receiving): module scaffold + fp.receiving.damage + fp.receiving.line models
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# -*- 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')
|
||||
Reference in New Issue
Block a user