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:
6
fusion-plating/fusion_plating_receiving/__init__.py
Normal file
6
fusion-plating/fusion_plating_receiving/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- 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 models
|
||||
47
fusion-plating/fusion_plating_receiving/__manifest__.py
Normal file
47
fusion-plating/fusion_plating_receiving/__manifest__.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
# Part of the Fusion Plating product family.
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating — Receiving & Inspection',
|
||||
'version': '19.0.1.0.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Parts receiving, inspection, damage logging, and manufacturing gate.',
|
||||
'description': """
|
||||
Fusion Plating — Receiving & Inspection
|
||||
=========================================
|
||||
|
||||
Part of the Fusion Plating product family by Nexa Systems Inc.
|
||||
|
||||
Provides:
|
||||
- Parts receiving records linked to sale orders
|
||||
- Quantity verification and condition inspection
|
||||
- Damage logging with photos and severity tracking
|
||||
- Auto-creation of receiving records on SO confirmation
|
||||
- Soft manufacturing gate (warns if parts not received)
|
||||
""",
|
||||
'author': 'Nexa Systems Inc.',
|
||||
'website': 'https://www.nexasystems.ca',
|
||||
'maintainer': 'Nexa Systems Inc.',
|
||||
'support': 'support@nexasystems.ca',
|
||||
'license': 'OPL-1',
|
||||
'price': 0.00,
|
||||
'currency': 'CAD',
|
||||
'depends': [
|
||||
'fusion_plating_configurator',
|
||||
'sale_management',
|
||||
'mrp',
|
||||
],
|
||||
'data': [
|
||||
'security/fp_receiving_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'data/fp_receiving_sequence_data.xml',
|
||||
'views/fp_receiving_views.xml',
|
||||
'views/sale_order_views.xml',
|
||||
'views/fp_receiving_menu.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': False,
|
||||
'auto_install': False,
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Part of the Fusion Plating product family.
|
||||
-->
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="seq_fp_receiving" model="ir.sequence">
|
||||
<field name="name">Fusion Plating: Receiving</field>
|
||||
<field name="code">fp.receiving</field>
|
||||
<field name="prefix">RCV-</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
10
fusion-plating/fusion_plating_receiving/models/__init__.py
Normal file
10
fusion-plating/fusion_plating_receiving/models/__init__.py
Normal 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
|
||||
@@ -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.
|
||||
@@ -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')
|
||||
@@ -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')
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Part of the Fusion Plating product family.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="group_fp_receiving" model="res.groups">
|
||||
<field name="name">Receiving</field>
|
||||
<field name="sequence">55</field>
|
||||
<field name="privilege_id" ref="fusion_plating.res_groups_privilege_fusion_plating"/>
|
||||
<field name="implied_ids" eval="[(4, ref('fusion_plating.group_fusion_plating_operator'))]"/>
|
||||
<field name="user_ids" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,10 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_fp_receiving_operator,fp.receiving.operator,model_fp_receiving,fusion_plating.group_fusion_plating_operator,1,0,0,0
|
||||
access_fp_receiving_receiver,fp.receiving.receiver,model_fp_receiving,group_fp_receiving,1,1,1,0
|
||||
access_fp_receiving_manager,fp.receiving.manager,model_fp_receiving,fusion_plating.group_fusion_plating_manager,1,1,1,1
|
||||
access_fp_receiving_line_operator,fp.receiving.line.operator,model_fp_receiving_line,fusion_plating.group_fusion_plating_operator,1,0,0,0
|
||||
access_fp_receiving_line_receiver,fp.receiving.line.receiver,model_fp_receiving_line,group_fp_receiving,1,1,1,0
|
||||
access_fp_receiving_line_manager,fp.receiving.line.manager,model_fp_receiving_line,fusion_plating.group_fusion_plating_manager,1,1,1,1
|
||||
access_fp_receiving_damage_operator,fp.receiving.damage.operator,model_fp_receiving_damage,fusion_plating.group_fusion_plating_operator,1,0,0,0
|
||||
access_fp_receiving_damage_receiver,fp.receiving.damage.receiver,model_fp_receiving_damage,group_fp_receiving,1,1,1,0
|
||||
access_fp_receiving_damage_manager,fp.receiving.damage.manager,model_fp_receiving_damage,fusion_plating.group_fusion_plating_manager,1,1,1,1
|
||||
|
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo></odoo>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo></odoo>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo></odoo>
|
||||
Reference in New Issue
Block a user