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.
This commit is contained in:
@@ -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')],
|
||||
|
||||
Reference in New Issue
Block a user