feat(jobs): persist deadlines + planned start + notes on fp.job
Tier 2 of the SO->fp.job persistence audit. Four operational metadata fields mirrored from sale.order: - x_fc_internal_deadline (Date) - shop's internal target finish date, ahead of the customer-facing deadline. Kept separate from date_deadline (which scheduling code may adjust). - x_fc_planned_start_date (Date) - customer-quoted planned start date. Kept separate from date_planned_start (Datetime, capacity-adjusted). - x_fc_internal_note (Text) - shop-internal notes from the order. - x_fc_external_note (Text) - customer-facing notes, printed on traveller / BoL / cert. All four populate at SO confirm via _fp_auto_create_job, and surface on sale.order.line as stored related fields for per-line visibility. fp.job form view gets a Notes group alongside the Customer References group from Tier 1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -289,6 +289,37 @@ class FpJob(models.Model):
|
||||
'job form to know it\'s rush.',
|
||||
)
|
||||
|
||||
# ---- Scheduling targets mirrored from sale.order -----------------
|
||||
# These are kept separate from the operational date_planned_start /
|
||||
# date_deadline fields (which may be tweaked by scheduling logic) —
|
||||
# this preserves the ORIGINAL customer-facing dates entered on the SO.
|
||||
x_fc_internal_deadline = fields.Date(
|
||||
string='Internal Deadline',
|
||||
tracking=True,
|
||||
help='Shop\'s internal target finish date, copied from sale.order. '
|
||||
'Buffer ahead of the customer-facing deadline.',
|
||||
)
|
||||
x_fc_planned_start_date = fields.Date(
|
||||
string='Planned Start (SO)',
|
||||
tracking=True,
|
||||
help='Customer-quoted planned start date copied from sale.order. '
|
||||
'Different from date_planned_start (which scheduling logic '
|
||||
'may adjust based on shop capacity).',
|
||||
)
|
||||
|
||||
# ---- Operational notes mirrored from sale.order ------------------
|
||||
x_fc_internal_note = fields.Text(
|
||||
string='Internal Note',
|
||||
tracking=True,
|
||||
help='Shop-internal notes from the order. Not shown to customer.',
|
||||
)
|
||||
x_fc_external_note = fields.Text(
|
||||
string='External Note',
|
||||
tracking=True,
|
||||
help='Customer-facing notes copied from the sale order. Printed '
|
||||
'on traveller / BoL / cert.',
|
||||
)
|
||||
|
||||
qty_received = fields.Integer(
|
||||
string='Qty Received',
|
||||
help='Paper traveller "Qty Rec." column.',
|
||||
|
||||
Reference in New Issue
Block a user