From 01df46f79f789a56c7ddaa914938b4dd92c9991f Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 26 May 2026 21:03:47 -0400 Subject: [PATCH] feat(configurator): C6 - Express Orders form view + menu (v1, stock widgets) Spreadsheet-style flat entry view on the existing fp.direct.order.wizard model. Renders: - Customer + Shipping prominent (row 1) - PO block (PO# + attachment + Pending toggle + Expected date) - Scheduling/Lead Time + Pricing/Pricelist (row 2) - Order Lines spreadsheet with: Part #, Specification, Line Job #, Thickness, Mask toggle, Bake text, Internal Notes, Serials, Qty, Price, Subtotal, Process/Recipe (optional-show) - Notes + Terms split (internal vs customer-facing) - View-switch buttons to bounce between Express and Legacy on a draft New menu: Plating > Sales > '+ New Express Order' (sequence 3). Same DB rows as legacy view (view_source='express' for routing). v1 deferments: OWL FpExpressPartCell (multi-row part cell), OWL FpExpressBakePill (click-to-edit), DWG/OPEN/+bulk inline buttons, custom SCSS, quick-create part view, pricelist display_name override. These come in later iterations. --- .../__manifest__.py | 1 + .../views/fp_express_order_views.xml | 263 ++++++++++++++++++ .../wizard/fp_direct_order_wizard.py | 29 ++ 3 files changed, 293 insertions(+) create mode 100644 fusion_plating/fusion_plating_configurator/views/fp_express_order_views.xml diff --git a/fusion_plating/fusion_plating_configurator/__manifest__.py b/fusion_plating/fusion_plating_configurator/__manifest__.py index 843d51c1..500bf3d7 100644 --- a/fusion_plating/fusion_plating_configurator/__manifest__.py +++ b/fusion_plating/fusion_plating_configurator/__manifest__.py @@ -50,6 +50,7 @@ Provides: 'views/fp_sale_description_template_views.xml', 'views/fp_serial_views.xml', 'wizard/fp_direct_order_wizard_views.xml', + 'views/fp_express_order_views.xml', 'wizard/fp_add_from_so_wizard_views.xml', 'wizard/fp_add_from_quote_wizard_views.xml', 'wizard/fp_quote_promote_wizard_views.xml', diff --git a/fusion_plating/fusion_plating_configurator/views/fp_express_order_views.xml b/fusion_plating/fusion_plating_configurator/views/fp_express_order_views.xml new file mode 100644 index 00000000..b8b732e0 --- /dev/null +++ b/fusion_plating/fusion_plating_configurator/views/fp_express_order_views.xml @@ -0,0 +1,263 @@ + + + + + + + fp.express.order.form + fp.direct.order.wizard + 10 + +
+
+
+ + + + + +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ + Order will confirm without a PO. A chase activity + will be scheduled for the expected date so sales + follows up. +
+
+
+ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+ + +
+
+ + + + + New Express Order + fp.direct.order.wizard + form + + current + {'default_view_source': 'express'} + + + + +
diff --git a/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py b/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py index 4cd32733..b513d54d 100644 --- a/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py +++ b/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py @@ -164,6 +164,35 @@ class FpDirectOrderWizard(models.Model): def _fp_default_pricelist(self): """Default pricelist = company's default. Re-resolved on partner pick.""" return self.env.company.partner_id.property_product_pricelist.id or False + + # ---- View switching (Express ↔ Legacy) ---- + def action_switch_to_express(self): + """Re-open this draft in the Express view.""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'res_model': 'fp.direct.order.wizard', + 'res_id': self.id, + 'view_mode': 'form', + 'view_id': self.env.ref( + 'fusion_plating_configurator.view_fp_express_order_form' + ).id, + 'target': 'current', + } + + def action_switch_to_legacy(self): + """Re-open this draft in the Legacy direct-order view.""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'res_model': 'fp.direct.order.wizard', + 'res_id': self.id, + 'view_mode': 'form', + 'view_id': self.env.ref( + 'fusion_plating_configurator.view_fp_direct_order_wizard_form' + ).id, + 'target': 'current', + } invoice_strategy = fields.Selection( [('deposit', 'Deposit'), ('progress', 'Progress Billing'), ('net_terms', 'Net Terms'), ('cod_prepay', 'COD / Prepay')],