feat(plating): Sub 8 — split receiving vs inspection + box parity
fp.receiving simplifies to box-count-only (new primary state machine: draft → counted → staged → closed). Legacy inspecting/accepted/discrepancy/resolved states stay in the Selection so existing records load without error but are surfaced behind a manager-only toggle. New box_count_in field + banner that tells the receiver "count boxes only — parts are inspected by the racking crew." New fp.racking.inspection + fp.racking.inspection.line models — one record per MO, auto-created by mrp.production.create() with one line per contributing SO line (qty_expected seeded, qty_found + condition filled in by the racking crew when they open the boxes). State: draft → inspecting → done | discrepancy_flagged (flagged when any line has a non-ok condition or qty variance). Reopen restricted to Plating Manager. WO soft gate: first plating WO button_start raises a UserError when the MO's racking inspection is still Draft or Inspecting. Plating Manager bypasses; later WOs are not gated. fp.delivery gains x_fc_box_count_out. action_mark_delivered calls _fp_check_box_parity which posts a non-blocking chatter warning when boxes out ≠ boxes in (resolved via job_ref → MO.origin → SO → receiving). Warning only — never blocks shipping. Menu entry: Plating → Operations → Racking Inspection. Module version bumps: fusion_plating_receiving → 19.0.3.0.0 fusion_plating_logistics → 19.0.3.0.0 fusion_plating_bridge_mrp → 19.0.12.0.0 (+depends receiving) Smoke on entech: 12/12 assertions pass (one gate test skipped — MO had no WOs to test) including box-count state machine, inspection auto-create, lifecycle, discrepancy flag, and box-parity chatter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating — Receiving & Inspection',
|
||||
'version': '19.0.2.1.0',
|
||||
'version': '19.0.3.0.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Parts receiving, inspection, damage logging, and manufacturing gate.',
|
||||
'description': """
|
||||
@@ -38,6 +38,7 @@ Provides:
|
||||
'security/ir.model.access.csv',
|
||||
'data/fp_receiving_sequence_data.xml',
|
||||
'views/fp_receiving_views.xml',
|
||||
'views/fp_racking_inspection_views.xml',
|
||||
'views/sale_order_views.xml',
|
||||
'views/fp_receiving_menu.xml',
|
||||
],
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
from . import fp_receiving_damage
|
||||
from . import fp_receiving_line
|
||||
from . import fp_receiving
|
||||
from . import fp_racking_inspection
|
||||
from . import sale_order
|
||||
from . import mrp_production
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
# Part of the Fusion Plating product family.
|
||||
#
|
||||
# Sub 8 — Racking-time inspection record. Captures the per-part
|
||||
# inspection the racking crew performs when they open the customer's
|
||||
# boxes (which is DIFFERENT from receiving — receiving is box count
|
||||
# only). One record per MO.
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class FpRackingInspection(models.Model):
|
||||
_name = 'fp.racking.inspection'
|
||||
_description = 'Racking-time Inspection'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = 'create_date desc, id desc'
|
||||
|
||||
name = fields.Char(compute='_compute_name', store=True)
|
||||
production_id = fields.Many2one(
|
||||
'mrp.production',
|
||||
string='Manufacturing Order',
|
||||
required=True,
|
||||
ondelete='cascade',
|
||||
index=True,
|
||||
tracking=True,
|
||||
)
|
||||
sale_order_id = fields.Many2one(
|
||||
'sale.order',
|
||||
string='Sale Order',
|
||||
compute='_compute_sale_order',
|
||||
store=True,
|
||||
)
|
||||
partner_id = fields.Many2one(
|
||||
'res.partner',
|
||||
string='Customer',
|
||||
compute='_compute_sale_order',
|
||||
store=True,
|
||||
)
|
||||
receiving_id = fields.Many2one(
|
||||
'fp.receiving',
|
||||
string='Source Receiving',
|
||||
compute='_compute_receiving_id',
|
||||
store=True,
|
||||
help='The receiving record whose boxes feed this inspection.',
|
||||
)
|
||||
state = fields.Selection(
|
||||
[('draft', 'Draft'),
|
||||
('inspecting', 'Inspecting'),
|
||||
('done', 'Done'),
|
||||
('discrepancy_flagged', 'Discrepancy Flagged')],
|
||||
default='draft',
|
||||
required=True,
|
||||
tracking=True,
|
||||
)
|
||||
inspector_id = fields.Many2one(
|
||||
'res.users',
|
||||
string='Inspector',
|
||||
readonly=True,
|
||||
copy=False,
|
||||
tracking=True,
|
||||
)
|
||||
inspection_started = fields.Datetime(readonly=True, copy=False)
|
||||
inspection_completed = fields.Datetime(readonly=True, copy=False)
|
||||
line_ids = fields.One2many(
|
||||
'fp.racking.inspection.line',
|
||||
'inspection_id',
|
||||
copy=True,
|
||||
)
|
||||
notes = fields.Text()
|
||||
company_id = fields.Many2one(
|
||||
'res.company',
|
||||
required=True,
|
||||
default=lambda s: s.env.company,
|
||||
)
|
||||
|
||||
line_count = fields.Integer(compute='_compute_line_stats')
|
||||
ok_count = fields.Integer(compute='_compute_line_stats')
|
||||
flagged_count = fields.Integer(compute='_compute_line_stats')
|
||||
has_variance = fields.Boolean(compute='_compute_line_stats')
|
||||
|
||||
_sql_constraints = [
|
||||
('fp_racking_insp_mo_uniq',
|
||||
'unique(production_id)',
|
||||
'Only one racking inspection per manufacturing order.'),
|
||||
]
|
||||
|
||||
# ---- Computes ------------------------------------------------------------
|
||||
|
||||
@api.depends('production_id.name', 'partner_id.name')
|
||||
def _compute_name(self):
|
||||
for rec in self:
|
||||
if rec.production_id:
|
||||
rec.name = _('Inspection — %s') % rec.production_id.name
|
||||
else:
|
||||
rec.name = _('Racking Inspection')
|
||||
|
||||
@api.depends('production_id.origin')
|
||||
def _compute_sale_order(self):
|
||||
SO = self.env['sale.order']
|
||||
for rec in self:
|
||||
so = False
|
||||
if rec.production_id and rec.production_id.origin:
|
||||
so = SO.search(
|
||||
[('name', '=', rec.production_id.origin)], limit=1,
|
||||
)
|
||||
rec.sale_order_id = so or False
|
||||
rec.partner_id = so.partner_id if so else False
|
||||
|
||||
@api.depends('sale_order_id')
|
||||
def _compute_receiving_id(self):
|
||||
Receiving = self.env['fp.receiving']
|
||||
for rec in self:
|
||||
rec.receiving_id = (
|
||||
Receiving.search(
|
||||
[('sale_order_id', '=', rec.sale_order_id.id)], limit=1,
|
||||
)
|
||||
if rec.sale_order_id else False
|
||||
)
|
||||
|
||||
@api.depends('line_ids.condition', 'line_ids.qty_variance')
|
||||
def _compute_line_stats(self):
|
||||
for rec in self:
|
||||
rec.line_count = len(rec.line_ids)
|
||||
rec.ok_count = len(rec.line_ids.filtered(
|
||||
lambda l: l.condition == 'ok' and l.qty_variance == 0
|
||||
))
|
||||
rec.flagged_count = len(rec.line_ids.filtered(
|
||||
lambda l: l.condition != 'ok' or l.qty_variance != 0
|
||||
))
|
||||
rec.has_variance = bool(rec.flagged_count)
|
||||
|
||||
# ---- Actions -------------------------------------------------------------
|
||||
|
||||
def action_start(self):
|
||||
"""Racker opens the boxes and begins inspecting."""
|
||||
for rec in self:
|
||||
if rec.state != 'draft':
|
||||
raise UserError(_('Can only start a Draft inspection.'))
|
||||
rec.write({
|
||||
'state': 'inspecting',
|
||||
'inspector_id': self.env.user.id,
|
||||
'inspection_started': fields.Datetime.now(),
|
||||
})
|
||||
rec.message_post(body=_('Inspection started by %s.') % self.env.user.name)
|
||||
|
||||
def action_complete(self):
|
||||
"""Racker is satisfied with the inspection. Advance to Done."""
|
||||
for rec in self:
|
||||
if rec.state != 'inspecting':
|
||||
raise UserError(_('Can only complete an Inspecting record.'))
|
||||
new_state = 'discrepancy_flagged' if rec.flagged_count else 'done'
|
||||
rec.write({
|
||||
'state': new_state,
|
||||
'inspection_completed': fields.Datetime.now(),
|
||||
})
|
||||
if new_state == 'discrepancy_flagged':
|
||||
rec.activity_schedule(
|
||||
'mail.mail_activity_data_todo',
|
||||
summary=_('Racking discrepancy on %s') % (
|
||||
rec.production_id.name or ''
|
||||
),
|
||||
note=_(
|
||||
'%(n)d line(s) flagged — review before starting '
|
||||
'the first plating WO.'
|
||||
) % {'n': rec.flagged_count},
|
||||
)
|
||||
rec.message_post(body=_(
|
||||
'Inspection completed — %(ok)d ok / %(flag)d flagged.'
|
||||
) % {'ok': rec.ok_count, 'flag': rec.flagged_count})
|
||||
|
||||
def action_reopen(self):
|
||||
"""Manager only — reopen a done inspection."""
|
||||
if not self.env.user.has_group(
|
||||
'fusion_plating.group_fusion_plating_manager'):
|
||||
raise UserError(_('Only a Plating Manager can reopen a completed '
|
||||
'racking inspection.'))
|
||||
for rec in self:
|
||||
rec.write({
|
||||
'state': 'inspecting',
|
||||
'inspection_completed': False,
|
||||
})
|
||||
rec.message_post(body=_('Reopened by %s.') % self.env.user.name)
|
||||
|
||||
|
||||
class FpRackingInspectionLine(models.Model):
|
||||
_name = 'fp.racking.inspection.line'
|
||||
_description = 'Racking Inspection Line'
|
||||
_order = 'inspection_id, sequence, id'
|
||||
|
||||
inspection_id = fields.Many2one(
|
||||
'fp.racking.inspection',
|
||||
required=True,
|
||||
ondelete='cascade',
|
||||
)
|
||||
sequence = fields.Integer(default=10)
|
||||
part_catalog_id = fields.Many2one(
|
||||
'fp.part.catalog', string='Part',
|
||||
)
|
||||
part_number = fields.Char(
|
||||
related='part_catalog_id.part_number', store=True,
|
||||
)
|
||||
part_revision = fields.Char(
|
||||
related='part_catalog_id.revision', store=True,
|
||||
)
|
||||
qty_expected = fields.Integer(string='Expected Qty')
|
||||
qty_found = fields.Integer(string='Counted Qty')
|
||||
qty_variance = fields.Integer(
|
||||
compute='_compute_qty_variance', store=True,
|
||||
)
|
||||
condition = fields.Selection(
|
||||
[('ok', 'OK'),
|
||||
('minor', 'Minor Issue'),
|
||||
('major', 'Major Issue'),
|
||||
('reject', 'Reject')],
|
||||
default='ok',
|
||||
required=True,
|
||||
)
|
||||
notes = fields.Char(string='Notes')
|
||||
|
||||
@api.depends('qty_expected', 'qty_found')
|
||||
def _compute_qty_variance(self):
|
||||
for rec in self:
|
||||
rec.qty_variance = (rec.qty_found or 0) - (rec.qty_expected or 0)
|
||||
@@ -39,16 +39,32 @@ class FpReceiving(models.Model):
|
||||
received_date = fields.Datetime(
|
||||
string='Received Date', default=fields.Datetime.now, tracking=True,
|
||||
)
|
||||
# Sub 8 — simplified state machine. Receiving = box count only. The
|
||||
# part-level inspection that used to happen here now lives on
|
||||
# fp.racking.inspection (racking crew does it when they open the
|
||||
# boxes). Legacy state values are kept in the Selection so existing
|
||||
# records from before Sub 8 don't raise on upgrade.
|
||||
state = fields.Selection(
|
||||
[
|
||||
('draft', 'Awaiting Parts'),
|
||||
('inspecting', 'Inspecting'),
|
||||
('accepted', 'Accepted'),
|
||||
('discrepancy', 'Discrepancy'),
|
||||
('resolved', 'Resolved'),
|
||||
('draft', 'Awaiting Parts'),
|
||||
('counted', 'Counted'),
|
||||
('staged', 'Staged for Racking'),
|
||||
('closed', 'Closed'),
|
||||
# Legacy values — kept readable, never written by new code
|
||||
('inspecting', 'Inspecting (legacy)'),
|
||||
('accepted', 'Accepted (legacy)'),
|
||||
('discrepancy', 'Discrepancy (legacy)'),
|
||||
('resolved', 'Resolved (legacy)'),
|
||||
],
|
||||
string='Status', default='draft', tracking=True, required=True,
|
||||
)
|
||||
box_count_in = fields.Integer(
|
||||
string='Boxes Received',
|
||||
tracking=True,
|
||||
help='Number of boxes the receiver counted when the truck '
|
||||
'dropped off. Receiving is box count only — parts are '
|
||||
'inspected by the racking crew when boxes are opened.',
|
||||
)
|
||||
expected_qty = fields.Integer(string='Expected Qty', help='Total quantity expected from the sale order.')
|
||||
received_qty = fields.Integer(string='Received Qty', help='Total quantity actually received.')
|
||||
qty_match = fields.Boolean(
|
||||
@@ -96,7 +112,46 @@ class FpReceiving(models.Model):
|
||||
return super().create(vals_list)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# State actions
|
||||
# Sub 8 — box-count-only actions (new primary flow)
|
||||
# -------------------------------------------------------------------------
|
||||
def action_mark_counted(self):
|
||||
"""Receiver has counted the boxes on the dock. Move to Counted."""
|
||||
for rec in self:
|
||||
if rec.state not in ('draft', 'inspecting'): # inspecting allows legacy records
|
||||
raise UserError(_('Only Awaiting-Parts or legacy-Inspecting '
|
||||
'records can be marked Counted.'))
|
||||
if not rec.box_count_in:
|
||||
raise UserError(_('Set the Boxes Received count before marking Counted.'))
|
||||
rec.state = 'counted'
|
||||
rec.received_by_id = self.env.user
|
||||
rec.received_date = fields.Datetime.now()
|
||||
rec.message_post(body=_(
|
||||
'%(user)s counted %(n)d box(es) at receiving.'
|
||||
) % {'user': self.env.user.name, 'n': rec.box_count_in})
|
||||
|
||||
def action_mark_staged(self):
|
||||
"""Boxes are in the racking area, awaiting the racking crew."""
|
||||
for rec in self:
|
||||
if rec.state not in ('counted',):
|
||||
raise UserError(_('Only Counted records can be marked Staged.'))
|
||||
rec.state = 'staged'
|
||||
rec._update_so_receiving_status()
|
||||
rec.message_post(body=_('Boxes staged for racking.'))
|
||||
|
||||
def action_close(self):
|
||||
"""Close the receiving — all boxes opened, inspection complete."""
|
||||
for rec in self:
|
||||
if rec.state not in ('staged', 'accepted', 'resolved'):
|
||||
raise UserError(_('Only Staged (or legacy Accepted / Resolved) '
|
||||
'records can be closed.'))
|
||||
rec.state = 'closed'
|
||||
rec._update_so_receiving_status()
|
||||
rec.message_post(body=_('Receiving closed.'))
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Legacy state actions — kept for backward compatibility.
|
||||
# Deprecated: Sub 8 moves part-level inspection to fp.racking.inspection.
|
||||
# Retained so existing UI bindings don't blow up.
|
||||
# -------------------------------------------------------------------------
|
||||
def action_start_inspection(self):
|
||||
"""Move from draft to inspecting."""
|
||||
|
||||
@@ -8,3 +8,9 @@ access_fp_receiving_line_manager,fp.receiving.line.manager,model_fp_receiving_li
|
||||
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
|
||||
access_fp_racking_inspection_operator,fp.racking.inspection.operator,model_fp_racking_inspection,fusion_plating.group_fusion_plating_operator,1,1,1,0
|
||||
access_fp_racking_inspection_supervisor,fp.racking.inspection.supervisor,model_fp_racking_inspection,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
|
||||
access_fp_racking_inspection_manager,fp.racking.inspection.manager,model_fp_racking_inspection,fusion_plating.group_fusion_plating_manager,1,1,1,1
|
||||
access_fp_racking_inspection_line_operator,fp.racking.inspection.line.operator,model_fp_racking_inspection_line,fusion_plating.group_fusion_plating_operator,1,1,1,1
|
||||
access_fp_racking_inspection_line_supervisor,fp.racking.inspection.line.supervisor,model_fp_racking_inspection_line,fusion_plating.group_fusion_plating_supervisor,1,1,1,1
|
||||
access_fp_racking_inspection_line_manager,fp.racking.inspection.line.manager,model_fp_racking_inspection_line,fusion_plating.group_fusion_plating_manager,1,1,1,1
|
||||
|
||||
|
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Sub 8 — Racking-time inspection views.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_racking_inspection_form" model="ir.ui.view">
|
||||
<field name="name">fp.racking.inspection.form</field>
|
||||
<field name="model">fp.racking.inspection</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Racking Inspection">
|
||||
<header>
|
||||
<button name="action_start" type="object"
|
||||
string="Start Inspection"
|
||||
class="btn-primary"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_complete" type="object"
|
||||
string="Complete"
|
||||
class="btn-primary"
|
||||
invisible="state != 'inspecting'"/>
|
||||
<button name="action_reopen" type="object"
|
||||
string="Reopen"
|
||||
groups="fusion_plating.group_fusion_plating_manager"
|
||||
invisible="state not in ('done', 'discrepancy_flagged')"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,inspecting,done,discrepancy_flagged"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" readonly="1"/></h1>
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="state != 'draft'">
|
||||
<i class="fa fa-info-circle me-2"/>
|
||||
<strong>Racking inspection.</strong> Open the customer's boxes,
|
||||
count each part type, and note any condition issues below.
|
||||
This is separate from receiving (which just counted boxes).
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="production_id" readonly="1"/>
|
||||
<field name="sale_order_id" readonly="1"/>
|
||||
<field name="receiving_id" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_id" readonly="1"/>
|
||||
<field name="inspector_id" readonly="1"/>
|
||||
<field name="inspection_started" readonly="1"/>
|
||||
<field name="inspection_completed" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Inspection Lines" name="lines">
|
||||
<field name="line_ids" readonly="state in ('done','discrepancy_flagged')">
|
||||
<list editable="bottom"
|
||||
decoration-warning="condition == 'minor' or qty_variance != 0"
|
||||
decoration-danger="condition in ('major','reject')">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="part_catalog_id"/>
|
||||
<field name="part_number" readonly="1"/>
|
||||
<field name="part_revision" readonly="1"/>
|
||||
<field name="qty_expected"/>
|
||||
<field name="qty_found"/>
|
||||
<field name="qty_variance" readonly="1"/>
|
||||
<field name="condition"/>
|
||||
<field name="notes"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="notes" nolabel="1"
|
||||
readonly="state in ('done','discrepancy_flagged')"/>
|
||||
</page>
|
||||
<page string="Summary" name="summary">
|
||||
<group>
|
||||
<field name="line_count" readonly="1"/>
|
||||
<field name="ok_count" readonly="1"/>
|
||||
<field name="flagged_count" readonly="1"/>
|
||||
<field name="has_variance" readonly="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_racking_inspection_list" model="ir.ui.view">
|
||||
<field name="name">fp.racking.inspection.list</field>
|
||||
<field name="model">fp.racking.inspection</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Racking Inspections"
|
||||
decoration-info="state == 'inspecting'"
|
||||
decoration-warning="state == 'draft'"
|
||||
decoration-success="state == 'done'"
|
||||
decoration-danger="state == 'discrepancy_flagged'">
|
||||
<field name="name"/>
|
||||
<field name="production_id"/>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="line_count" string="Parts"/>
|
||||
<field name="flagged_count" string="Flagged"/>
|
||||
<field name="inspector_id"/>
|
||||
<field name="state" widget="badge"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_racking_inspection_search" model="ir.ui.view">
|
||||
<field name="name">fp.racking.inspection.search</field>
|
||||
<field name="model">fp.racking.inspection</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="production_id"/>
|
||||
<field name="partner_id"/>
|
||||
<separator/>
|
||||
<filter name="filter_pending"
|
||||
string="Pending"
|
||||
domain="[('state', 'in', ['draft', 'inspecting'])]"/>
|
||||
<filter name="filter_flagged"
|
||||
string="Flagged"
|
||||
domain="[('state', '=', 'discrepancy_flagged')]"/>
|
||||
<filter name="filter_done"
|
||||
string="Done"
|
||||
domain="[('state', '=', 'done')]"/>
|
||||
<group>
|
||||
<filter name="group_state" string="State"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter name="group_customer" string="Customer"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_racking_inspection" model="ir.actions.act_window">
|
||||
<field name="name">Racking Inspection</field>
|
||||
<field name="res_model">fp.racking.inspection</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fp_racking_inspection_search"/>
|
||||
<field name="context">{'search_default_filter_pending': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No racking inspections yet.
|
||||
</p>
|
||||
<p>
|
||||
Racking inspections are auto-created when an MO is confirmed.
|
||||
The racking crew opens the customer's boxes, counts parts,
|
||||
and logs condition findings — the per-part quality check
|
||||
that used to live on receiving.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fp_racking_inspection"
|
||||
name="Racking Inspection"
|
||||
parent="fusion_plating.menu_fp_operations"
|
||||
action="action_fp_racking_inspection"
|
||||
sequence="23"/>
|
||||
|
||||
</odoo>
|
||||
@@ -40,28 +40,50 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Receiving">
|
||||
<header>
|
||||
<button name="action_start_inspection"
|
||||
string="Start Inspection"
|
||||
type="object"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_accept"
|
||||
string="Accept"
|
||||
<!-- Sub 8 — new primary flow: box count only -->
|
||||
<button name="action_mark_counted"
|
||||
string="Mark Counted"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state not in ('inspecting', 'resolved')"/>
|
||||
invisible="state not in ('draft', 'inspecting')"/>
|
||||
<button name="action_mark_staged"
|
||||
string="Stage for Racking"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="state != 'counted'"/>
|
||||
<button name="action_close"
|
||||
string="Close"
|
||||
type="object"
|
||||
invisible="state not in ('staged', 'accepted', 'resolved')"/>
|
||||
<!-- Legacy actions (hidden by default; surfaces for old records) -->
|
||||
<button name="action_accept"
|
||||
string="Accept (legacy)"
|
||||
type="object"
|
||||
invisible="state != 'inspecting'"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
<button name="action_flag_discrepancy"
|
||||
string="Flag Discrepancy"
|
||||
string="Flag Discrepancy (legacy)"
|
||||
type="object"
|
||||
class="btn-danger"
|
||||
invisible="state != 'inspecting'"/>
|
||||
invisible="state != 'inspecting'"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
<button name="action_resolve"
|
||||
string="Resolve"
|
||||
string="Resolve (legacy)"
|
||||
type="object"
|
||||
invisible="state != 'discrepancy'"/>
|
||||
invisible="state != 'discrepancy'"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,inspecting,accepted"/>
|
||||
statusbar_visible="draft,counted,staged,closed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<i class="fa fa-info-circle me-2"/>
|
||||
<strong>Receiving = box count only.</strong>
|
||||
Count the boxes the truck dropped off, set the number
|
||||
below, and stage them for racking. The racking crew
|
||||
opens the boxes and inspects each part — see
|
||||
<em>Plating → Operations → Racking Inspection</em>.
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
@@ -73,6 +95,9 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="po_number"/>
|
||||
</group>
|
||||
<group string="Box Count">
|
||||
<field name="box_count_in"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Reception">
|
||||
@@ -81,9 +106,9 @@
|
||||
<field name="carrier_name"/>
|
||||
<field name="carrier_tracking"/>
|
||||
</group>
|
||||
<group string="Quantities">
|
||||
<field name="expected_qty"/>
|
||||
<field name="received_qty"/>
|
||||
<group string="Quantities (populated by racking crew)">
|
||||
<field name="expected_qty" readonly="1"/>
|
||||
<field name="received_qty" readonly="1"/>
|
||||
<field name="qty_match" widget="boolean_toggle" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user