fix(fusion_plating_configurator): Express Order customers default customer_rank=1

Customers created from the Express Order / quote-configurator / part-catalog
pickers now default customer_rank=1, so they stay visible in those pickers and
the Customers menu (were landing at rank 0 and disappearing). The field context
is a real dict, not a string — Odoo 19 web_read does with_context(**context),
which throws TypeError on a str and broke the form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-06-03 08:36:38 -04:00
parent a19a299c7f
commit fc3fd513a9
4 changed files with 8 additions and 1 deletions

View File

@@ -62,6 +62,11 @@ class FpDirectOrderWizard(models.Model):
partner_id = fields.Many2one(
'res.partner', string='Customer',
domain="[('customer_rank', '>', 0)]",
# 2026-06-02: default customer_rank=1 so a customer created inline
# (quick-create) from the Express Order form is marked as a customer
# and stays visible in this picker AND the Customers menu (both filter
# customer_rank>0). Without it new customers got rank 0 and vanished.
context={'default_customer_rank': 1},
tracking=True,
)
partner_invoice_id = fields.Many2one(