This commit is contained in:
gsinghpal
2026-05-18 22:33:23 -04:00
parent 25f568f225
commit 091f98e1f9
76 changed files with 4521 additions and 220 deletions

View File

@@ -72,18 +72,41 @@
type="object"
invisible="state != 'discrepancy'"
groups="fusion_plating.group_fusion_plating_manager"/>
<button name="action_generate_outbound_label"
type="object"
string="Generate Outbound Label"
class="btn-primary"
icon="fa-print"
invisible="not x_fc_carrier_id or not x_fc_weight"/>
<button name="action_print_label"
type="object"
string="Print Label"
class="btn-secondary"
icon="fa-file-pdf-o"
invisible="not x_fc_outbound_shipment_id"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,counted,staged,closed"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_racking_inspections"
<button name="action_create_outbound_shipment"
type="object"
class="oe_stat_button"
icon="fa-search-plus">
<field name="racking_inspection_count"
icon="fa-truck">
<field name="x_fc_outbound_shipment_count"
widget="statinfo"
string="Racking Inspections"/>
string="Outbound Shipment"/>
</button>
<button name="action_print_label"
type="object"
class="oe_stat_button"
icon="fa-print"
invisible="not x_fc_has_label">
<div class="o_stat_info">
<span class="o_stat_value">PDF</span>
<span class="o_stat_text">Print Label</span>
</div>
<field name="x_fc_has_label" invisible="1"/>
</button>
</div>
<div class="alert alert-info" role="alert">
@@ -114,8 +137,46 @@
<group string="Reception">
<field name="received_by_id"/>
<field name="received_date"/>
<field name="carrier_name"/>
<field name="x_fc_carrier_id"
options="{'no_create': True}"/>
<field name="carrier_tracking"/>
<field name="carrier_name"
invisible="not carrier_name"
readonly="1"
string="Legacy Carrier"/>
</group>
</group>
<group string="Outbound Packaging"
invisible="not x_fc_carrier_id">
<group>
<label for="x_fc_weight"/>
<div class="o_row">
<field name="x_fc_weight"/>
<field name="x_fc_weight_uom" nolabel="1"/>
</div>
<label for="x_fc_length" string="Dimensions (L×W×H)"/>
<div class="o_row">
<field name="x_fc_length"
placeholder="L"/>
<span class="mx-1">×</span>
<field name="x_fc_width"
placeholder="W"/>
<span class="mx-1">×</span>
<field name="x_fc_height"
placeholder="H"/>
<field name="x_fc_dim_uom" nolabel="1"/>
</div>
</group>
<group>
<p class="text-muted" colspan="2">
Enter the weight and dimensions of the
packaging you'll use to ship the finished
parts back. The system reuses the same
boxes for the return shipment. Click
<strong>Generate Outbound Label</strong>
in the header once carrier + weight are
set.
</p>
</group>
<group string="Quantities (populated by racking crew)">
<field name="expected_qty" readonly="1"/>
@@ -124,6 +185,33 @@
</group>
</group>
<notebook>
<page string="Multi-Piece Packages"
name="outbound_packages"
invisible="not x_fc_carrier_id">
<p class="text-muted">
For multi-box shipments, add one row per
box with its weight + dimensions. The
carrier API will return one tracking
number + one label per row.
<strong>Single-box flow:</strong> leave
this empty and the top-level weight/dim
fields above are used.
</p>
<field name="x_fc_outbound_package_ids">
<list editable="bottom">
<field name="sequence" widget="handle"/>
<field name="weight"/>
<field name="length"/>
<field name="width"/>
<field name="height"/>
<field name="tracking_number"
readonly="1"/>
<field name="label_attachment_id"
readonly="1"
widget="many2one_binary"/>
</list>
</field>
</page>
<page string="Receiving Lines" name="lines">
<field name="line_ids">
<list editable="bottom">

View File

@@ -0,0 +1,32 @@
<?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.
Phase C MPS — extends fusion_shipping's shipment form with the
All Labels list (x_fc_label_attachment_ids, one entry per package
on a multi-piece shipment).
-->
<odoo>
<record id="view_fusion_shipment_form_mps_inherit" model="ir.ui.view">
<field name="name">fusion.shipment.form.mps.inherit</field>
<field name="model">fusion.shipment</field>
<field name="inherit_id" ref="fusion_shipping.view_fusion_shipment_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='labels']/group[1]" position="after">
<separator string="All Labels (Multi-Piece)"
invisible="not x_fc_label_attachment_ids"/>
<field name="x_fc_label_attachment_ids"
invisible="not x_fc_label_attachment_ids"
options="{'no_create': True}">
<list>
<field name="name"/>
<field name="mimetype"/>
<field name="file_size"/>
</list>
</field>
</xpath>
</field>
</record>
</odoo>