feat(configurator): x_fc_* fields on sale.order + new sale.order.line extensions
Task A5. Adds customer_job_number, planned_start_date, and internal_deadline on sale.order. Customer deadline maps to Odoo's native commitment_date. Creates sale_order_line.py with per-line plating fields: part_catalog_id, coating_config_id, treatment_ids M2M, part_deadline, rush_order. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,4 +12,6 @@ from . import fp_customer_price_list
|
|||||||
from . import fp_sale_description_template
|
from . import fp_sale_description_template
|
||||||
from . import fp_quote_configurator
|
from . import fp_quote_configurator
|
||||||
from . import sale_order
|
from . import sale_order
|
||||||
|
from . import sale_order_line
|
||||||
from . import res_partner
|
from . import res_partner
|
||||||
|
from . import fp_process_node
|
||||||
|
|||||||
@@ -58,6 +58,19 @@ class SaleOrder(models.Model):
|
|||||||
string='Receiving Status', default='not_received', tracking=True,
|
string='Receiving Status', default='not_received', tracking=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ---- Direct Order rewrite (Phase A) ----
|
||||||
|
x_fc_customer_job_number = fields.Char(
|
||||||
|
string='Customer Job #',
|
||||||
|
help="Customer's internal job number for cross-referencing.",
|
||||||
|
tracking=True,
|
||||||
|
)
|
||||||
|
x_fc_planned_start_date = fields.Date(
|
||||||
|
string='Planned Start Date', tracking=True,
|
||||||
|
)
|
||||||
|
x_fc_internal_deadline = fields.Date(
|
||||||
|
string='Internal Deadline', tracking=True,
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange('upload_rfq_file')
|
@api.onchange('upload_rfq_file')
|
||||||
def _onchange_upload_rfq_file(self):
|
def _onchange_upload_rfq_file(self):
|
||||||
"""Create attachment from uploaded binary and link it."""
|
"""Create attachment from uploaded binary and link it."""
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2026 Nexa Systems Inc.
|
||||||
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||||
|
# Part of the Fusion Plating product family.
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class SaleOrderLine(models.Model):
|
||||||
|
_inherit = 'sale.order.line'
|
||||||
|
|
||||||
|
x_fc_part_catalog_id = fields.Many2one(
|
||||||
|
'fp.part.catalog', string='Part',
|
||||||
|
)
|
||||||
|
x_fc_coating_config_id = fields.Many2one(
|
||||||
|
'fp.coating.config', string='Primary Treatment',
|
||||||
|
)
|
||||||
|
x_fc_treatment_ids = fields.Many2many(
|
||||||
|
'fp.treatment', string='Additional Treatments',
|
||||||
|
)
|
||||||
|
x_fc_part_deadline = fields.Date(string='Part Deadline')
|
||||||
|
x_fc_rush_order = fields.Boolean(string='Rush')
|
||||||
Reference in New Issue
Block a user