feat(jobs): persist Customer Job # + PO # + Rush Order on fp.job
Tier 1 of the SO->fp.job persistence audit. Three customer-reference fields entered on sale.order's Plating tab were not flowing through to fp.job (or SO lines), so the shop floor and printed paperwork (traveller, BoL, cert) had to round-trip via sale_order_id every time. Changes: - fp.job: new x_fc_customer_job_number (Char, tracking), x_fc_po_number (Char, tracking), x_fc_rush_order (Boolean, tracking). All three populated by _fp_auto_create_job at SO confirm time. - sale.order.line: x_fc_customer_job_number / x_fc_po_number added as stored related fields off order_id so per-line list views show the customer's references without navigating to the order header (x_fc_rush_order was already on lines). - fp.job form view: small Customer References group under the title surfaces the three fields where the user expects them. Verified end-to-end: SO -> SO line related fields -> fp.job direct fields all carry the same value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -262,6 +262,33 @@ class FpJob(models.Model):
|
||||
# Header counters mirror the paper traveller's "Qty Rec." / "VIS INSP."
|
||||
# / "Rework" columns (screens 16-18). Sub 12c's traveller report pulls
|
||||
# these into the printed header.
|
||||
# ---- Customer references mirrored from sale.order ----------------
|
||||
# Populated on SO confirm by _fp_auto_create_job. Without these
|
||||
# mirrors, certs / deliveries / chatter would have to round-trip
|
||||
# through job.sale_order_id.x_fc_* to find the customer's references,
|
||||
# and offline-printed paperwork on the shop floor wouldn't show them.
|
||||
x_fc_customer_job_number = fields.Char(
|
||||
string='Customer Job #',
|
||||
tracking=True,
|
||||
help='Customer\'s own job/lot reference. Copied from the '
|
||||
'sale order when the job is auto-created on SO confirm; '
|
||||
'printed on the cert, traveller, and BoL.',
|
||||
)
|
||||
x_fc_po_number = fields.Char(
|
||||
string='Customer PO #',
|
||||
tracking=True,
|
||||
help='Customer purchase order number. Mirrored from sale.order '
|
||||
'so the shop floor and printed paperwork have it without '
|
||||
'a round-trip to the SO.',
|
||||
)
|
||||
x_fc_rush_order = fields.Boolean(
|
||||
string='Rush Order',
|
||||
tracking=True,
|
||||
help='High-priority flag mirrored from sale.order. Operators see '
|
||||
'this on the queue / tablet at-a-glance — saves lifting the '
|
||||
'job form to know it\'s rush.',
|
||||
)
|
||||
|
||||
qty_received = fields.Integer(
|
||||
string='Qty Received',
|
||||
help='Paper traveller "Qty Rec." column.',
|
||||
|
||||
Reference in New Issue
Block a user