mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-20 09:30:59 +03:00
feat(form-decompile,form-compile): ролевой доступ колонки реквизита (View/Edit xr-флаг)
Раундтрип терял <View>/<Edit> на колонках реквизита (колонка ValueTable/ValueTree с <Type>):
ролевой доступ вида <Edit><xr:Common>false</xr:Common><xr:Value name="Role.X">true</xr:Value></Edit>
(напр. НастройкиУчетаЗарплаты/ФормаДополнительныхДанных — колонки РайонныйКоэффициент/Ссылка).
Механизм xr-флага уже был у самого реквизита (View/Edit) и userVisible — у колонок не подключён.
decompile (Decompile-AttrColumn): захват view/edit через Decompile-XrFlag (bool | {common,roles}).
compile (Emit-AttrColumn, ps1+py): эмиссия <View>/<Edit> через Emit-XrFlag после FunctionalOptions.
(Колонки идут своим путём Decompile-AttrColumn, не через GENERIC_SCALARS — коллизии ключа edit нет.)
Корпус (acc+erp 8.3.24): из 282591 колонок — 14 с <View>, 21 с <Edit> (редко, но реально).
Верификация: таргет-раундтрип 72 форм с колоночными View/Edit → категория закрыта (0 LOST;
остаток — другие категории content/right). Регресс form-compile 43/43 (ps1+py); 1С-cert кейса
table (колоночные View common-only и Edit с ролью грузятся в платформу). spec обновлён.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e007233c91
commit
cb3dda0d53
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.130 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.131 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -4563,6 +4563,11 @@ def emit_attr_column(lines, col, indent):
|
||||
emit_mltext(lines, f'{indent}\t', 'Title', col['title'])
|
||||
emit_type(lines, str(col.get('type', '')), f'{indent}\t')
|
||||
emit_functional_options(lines, col.get('functionalOptions'), f'{indent}\t')
|
||||
# Ролевой доступ колонки (View/Edit) — xr-флаг, как у самого реквизита
|
||||
if col.get('view') is not None:
|
||||
emit_xr_flag(lines, 'View', col['view'], f'{indent}\t')
|
||||
if col.get('edit') is not None:
|
||||
emit_xr_flag(lines, 'Edit', col['edit'], f'{indent}\t')
|
||||
lines.append(f'{indent}</Column>')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user