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:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating — Configurator',
|
||||
'version': '19.0.18.12.9',
|
||||
'version': '19.0.18.10.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.',
|
||||
'description': """
|
||||
@@ -59,7 +59,6 @@ Provides:
|
||||
'wizard/fp_add_from_quote_wizard_views.xml',
|
||||
'wizard/fp_quote_promote_wizard_views.xml',
|
||||
'wizard/fp_part_catalog_import_wizard_views.xml',
|
||||
'wizard/fp_part_revision_bump_wizard_views.xml',
|
||||
'wizard/fp_serial_bulk_add_wizard_views.xml',
|
||||
'views/fp_configurator_menu.xml',
|
||||
'data/fp_sale_description_template_data.xml',
|
||||
|
||||
@@ -641,3 +641,21 @@ class SaleOrderLine(models.Model):
|
||||
'n': n,
|
||||
'qty': int(line.product_uom_qty),
|
||||
})
|
||||
|
||||
|
||||
# ---- Customer references mirrored from parent sale.order ----------
|
||||
# Related (not stored) — display-only on the line list so shipping /
|
||||
# invoicing operators see the customer's job/PO ref per-line without
|
||||
# navigating up to the order header.
|
||||
x_fc_customer_job_number = fields.Char(
|
||||
related='order_id.x_fc_customer_job_number',
|
||||
string='Customer Job #',
|
||||
readonly=True,
|
||||
store=True,
|
||||
)
|
||||
x_fc_po_number = fields.Char(
|
||||
related='order_id.x_fc_po_number',
|
||||
string='Customer PO #',
|
||||
readonly=True,
|
||||
store=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user