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')],