fix(form-compile,meta-compile): PY ChartOfAccounts generators — list format + AccountingFlag name extraction

- form-compile.py: rewrite generate_chart_of_accounts_item_dsl and
  generate_chart_of_accounts_folder_dsl from dict-format to list-format
  (array of OrderedDict), matching PS1 canonical output
- meta-compile.py/ps1: extract flag['name'] from AccountingFlags and
  ExtDimensionAccountingFlags dicts instead of stringifying the whole object
- Update snapshots with clean flag names (Валютный/Количественный)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-04-13 15:55:33 +03:00
co-authored by Claude Opus 4.6
parent 0d31d17204
commit aedf6df674
6 changed files with 78 additions and 75 deletions
@@ -2694,10 +2694,12 @@ if ($objType -in $typesWithAttrTS) {
Emit-TabularSection "`t`t`t" $tsName $columns $objType $objName
}
foreach ($af in $acctFlags) {
Emit-AccountingFlag "`t`t`t" "$af"
$afName = if ($af.name) { $af.name } else { "$af" }
Emit-AccountingFlag "`t`t`t" $afName
}
foreach ($edf in $extDimFlags) {
Emit-ExtDimensionAccountingFlag "`t`t`t" "$edf"
$edfName = if ($edf.name) { $edf.name } else { "$edf" }
Emit-ExtDimensionAccountingFlag "`t`t`t" $edfName
}
foreach ($aa in $addrAttrs) {
Emit-AddressingAttribute "`t`t`t" $aa
@@ -2365,9 +2365,11 @@ if obj_type in types_with_attr_ts:
columns = ts_sections[ts_name]
emit_tabular_section('\t\t\t', ts_name, columns, obj_type, obj_name)
for af in acct_flags:
emit_accounting_flag('\t\t\t', str(af))
af_name = af['name'] if isinstance(af, dict) else str(af)
emit_accounting_flag('\t\t\t', af_name)
for edf in ext_dim_flags:
emit_ext_dimension_accounting_flag('\t\t\t', str(edf))
edf_name = edf['name'] if isinstance(edf, dict) else str(edf)
emit_ext_dimension_accounting_flag('\t\t\t', edf_name)
for aa in addr_attrs:
emit_addressing_attribute('\t\t\t', aa)
X('\t\t</ChildObjects>')