fix(configurator): drop the first-time-part "no saved specification" popup

The order-line onchange still auto-ticks "Save as Default" (so a new part's
spec is remembered next time) — only the explanatory popup is removed, per
client request. The ticked checkbox on the line is the cue now.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-29 12:11:34 -04:00
parent f75e082e67
commit 1b0657bd76
2 changed files with 9 additions and 16 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Plating — Configurator',
'version': '19.0.22.7.0',
'version': '19.0.22.7.1',
'category': 'Manufacturing/Plating',
'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.',
'description': """

View File

@@ -175,7 +175,8 @@ class FpDirectOrderLine(models.Model):
`push_to_defaults` so the first coating pick gets persisted
back to the part. Without this, the estimator has to remember
to tick the toggle and the second order doesn't pre-fill.
Returns a warning popup explaining what's happening.
(The explanatory popup was removed 2026-05-29 at the client's
request — the ticked "Save as Default" checkbox is the cue now.)
"""
warning = None
for rec in self:
@@ -217,25 +218,17 @@ class FpDirectOrderLine(models.Model):
# New-part auto-suggest: if no default spec exists AND no
# SO-line history exists, this is genuinely a first-time use
# of the part. Auto-tick the push_to_defaults toggle so
# whatever Sarah picks becomes the saved default — surface a
# warning popup so she knows. `is_one_off` always wins
# (operator opted out of catalog persistence), so don't
# auto-tick in that case.
# whatever the estimator picks becomes the saved default.
# The explanatory popup was removed 2026-05-29 at the
# client's request — the ticked "Save as Default" checkbox on
# the line is the visible cue now (no nag dialog).
# `is_one_off` always wins (operator opted out of catalog
# persistence), so don't auto-tick in that case.
if (not has_default_spec
and not has_history_spec
and not rec.is_one_off
and not rec.push_to_defaults):
rec.push_to_defaults = True
warning = {
'title': _('First-Time Part — Defaults Will Be Saved'),
'message': _(
'%(part)s has no saved specification. '
'The specification you pick on this line will '
'be saved as the part\'s default so the '
'next order auto-fills them. Untick "Save as '
'Default" on the line if you don\'t want this.'
) % {'part': part.display_name or part.part_number or '(part)'},
}
return {'warning': warning} if warning else None
# ---- Qty / price ----