You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[repo:objectui] Form field immutable: true is not enforced on the edit dialog — the lookup stays fully editable after create, while readonly disables required lookups on the create form; no flag delivers create-then-lock #16171
A form field declared immutable: true (spec: editable on create, locked after the record exists) is honoured only on the create form. On the edit dialog of the same form view the field is still fully editable — the lookup's 「选择…」 picker is enabled (disabled === false), the chip can be cleared, and a new value can be picked. So the only tool an author has to say "this FK is set once and never changes" (readonly breaks create because required lookups become disabled) does nothing on the surface it exists for.
Minimal reproduction
Platform 17.2.0 console.
Object kpi_entry_line with sheet: Field.lookup('kpi_entry_sheet', { required: true }) and plan_indicator: Field.lookup('kpi_plan_indicator', { required: true }). Form view:
List → 「新建」: both lookups editable, record can be created — correct.
Open an existing record → row menu 「编辑」 (or record page edit): both lookups still render as editable lookups; picking another sheet and saving sends the new sheet value.
Control: readonly: true on the same fields locks them on edit but also disables them on the create form, where they are required — the create form then fails with 「所属填报单不能为空」. So neither flag gives "settable once".
Expected
immutable: true renders the field as read-only (display value, no picker, no clear ✕) whenever the form is bound to an existing record, and as a normal input on create.
If the console cannot yet distinguish the two modes for a field, the spec should say so, or readonly should stop disabling required fields on create — one of the two flags must deliver the create-then-lock semantics.
Activity
fix(objects): 填报明细的归属两键建完锁定 —— 对象层 readonlyWhen 兜底视图层 immutable