diff --git a/fusion-plating/fusion_plating_configurator/models/sale_order.py b/fusion-plating/fusion_plating_configurator/models/sale_order.py new file mode 100644 index 00000000..c8479a2e --- /dev/null +++ b/fusion-plating/fusion_plating_configurator/models/sale_order.py @@ -0,0 +1,38 @@ +# -*- 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 api, fields, models + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + x_fc_configurator_id = fields.Many2one('fp.quote.configurator', string='Configurator', copy=False) + x_fc_part_catalog_id = fields.Many2one('fp.part.catalog', string='Part') + x_fc_coating_config_id = fields.Many2one('fp.coating.config', string='Coating Configuration') + x_fc_po_number = fields.Char(string='Customer PO #', tracking=True) + x_fc_po_attachment_id = fields.Many2one('ir.attachment', string='PO Document') + x_fc_po_received = fields.Boolean(string='PO Received', tracking=True) + x_fc_po_override = fields.Boolean(string='PO Override', + help='Manager override — proceed without formal PO (handshake deal).') + x_fc_po_override_reason = fields.Text(string='Override Reason') + x_fc_invoice_strategy = fields.Selection( + [('deposit', 'Deposit'), ('progress', 'Progress Billing'), + ('net_terms', 'Net Terms'), ('cod_prepay', 'COD / Prepay')], + string='Invoice Strategy', tracking=True, + ) + x_fc_deposit_percent = fields.Float(string='Deposit %', + help='Deposit percentage if strategy is Deposit.') + x_fc_rush_order = fields.Boolean(string='Rush Order', tracking=True) + x_fc_delivery_method = fields.Selection( + [('local_delivery', 'Local Delivery'), ('shipping_partner', 'Shipping Partner'), + ('customer_pickup', 'Customer Pickup')], + string='Delivery Method', tracking=True, + ) + x_fc_receiving_status = fields.Selection( + [('not_received', 'Not Received'), ('partial', 'Partial'), + ('received', 'Received'), ('inspected', 'Inspected')], + string='Receiving Status', default='not_received', tracking=True, + ) diff --git a/fusion-plating/fusion_plating_configurator/views/sale_order_views.xml b/fusion-plating/fusion_plating_configurator/views/sale_order_views.xml index 85d8c23e..d9659ac0 100644 --- a/fusion-plating/fusion_plating_configurator/views/sale_order_views.xml +++ b/fusion-plating/fusion_plating_configurator/views/sale_order_views.xml @@ -1,2 +1,98 @@ - + + + + + + sale.order.form.fp.configurator + sale.order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sale.order.list.fp + sale.order + + + + + + + + + + + + + + + + + + Quotations + sale.order + list,form,kanban + [('state', 'in', ('draft', 'sent'))] + + {'default_x_fc_delivery_method': 'shipping_partner'} + + + Create a new quotation + + + + + + + Sale Orders + sale.order + list,form,kanban + [('state', 'in', ('sale', 'done'))] + + + +
+ Create a new quotation +