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:
gsinghpal
2026-04-12 19:18:57 -04:00
parent 269469aa4f
commit d06b9fd522
15 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from . import fp_receiving_damage
from . import fp_receiving_line
from . import fp_receiving
from . import sale_order
from . import mrp_production

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
# Placeholder — implemented in a later task.

View File

@@ -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')

View File

@@ -0,0 +1,33 @@
# -*- 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 FpReceivingLine(models.Model):
"""Per-part-number receiving detail line.
Tracks expected vs received quantity and condition for each
distinct part number in the receiving record.
"""
_name = 'fp.receiving.line'
_description = 'Fusion Plating — Receiving Line'
_order = 'id'
receiving_id = fields.Many2one(
'fp.receiving', string='Receiving', required=True, ondelete='cascade',
)
part_catalog_id = fields.Many2one(
'fp.part.catalog', string='Part (Catalog)',
)
part_number = fields.Char(string='Part Number')
description = fields.Char(string='Description')
expected_qty = fields.Integer(string='Expected Qty')
received_qty = fields.Integer(string='Received Qty')
condition = fields.Selection(
[('good', 'Good'), ('damaged', 'Damaged'), ('mixed', 'Mixed')],
string='Condition', default='good',
)
notes = fields.Text(string='Notes')

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
# Placeholder — implemented in a later task.

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
# Placeholder — implemented in a later task.