From b4e6037fd4c4c82c1bd1617e0d38ba86d82db8ce Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Thu, 9 Jul 2026 22:05:51 +0300 Subject: [PATCH] =?UTF-8?q?feat(meta-compile,meta-decompile):=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D0=B0=20=D1=82=D0=B8?= =?UTF-8?q?=D0=BF=D0=B0=20DocumentJournal=20(=D0=96=D1=83=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D0=BB=D1=8B=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=BE=D0=B2)=20(v1.55/v0.46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 19-й тип, 82 объекта acc+erp. Рерайт Emit-DocumentJournalProperties/Emit-Column на общие хелперы (был легаси-хардкод + ПРОПУЩЕН ). Декомпилятор снят гейт +DJ; захват defaultForm/auxiliaryForm/registeredDocuments + колонки (columns: name/synonym/comment/indexing/references) + SA opt-out. - **Class-3 фикс: команды журнала** — DJ-блок ChildObjects эмитил только колонки; журналы несут полноблочные (Взаимодействия: 15 команд, DefinedType-параметр) → добавлен парсинг+Emit-Command (декомпилятор захватывал общим Commands-ридером). - IncludeHelpInContents (пропущен легаси) добавлен; comment/useStandardCommands/формы (verbatim — имя «Форма»)/презентации — динамические. StandardAttributes always-emit + opt-out (~7% опускают); Date Format ДЛФ=D — per-object override (не профиль, 71/203). - **Class-1: пустой колонки** ≠ авто → synonym:"" (как EnumValue). - Прощающий ввод registeredDocuments/references — Normalize-MDObjectRef (русские корни). ПОЛНЫЙ КОРПУС 82/82 match, TOTAL 0 — byte-exact order-preserved (колонки+команды). Регресс 56/56 ps1+py, ps1==py identical. spec §7.15, кейс document-journal-full. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../meta-compile/scripts/meta-compile.ps1 | 66 ++--- .../meta-compile/scripts/meta-compile.py | 67 ++--- .../meta-decompile/scripts/meta-decompile.ps1 | 43 ++- docs/meta-dsl-spec.md | 37 ++- .../meta-compile/document-journal-full.json | 32 +++ .../document-journal-full/Configuration.xml | 252 ++++++++++++++++++ .../DocumentJournals/ДвиженияДенег.xml | 228 ++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../Languages/Русский.xml | 16 ++ .../ЖурналСкладскихДокументов.xml | 1 + 10 files changed, 680 insertions(+), 80 deletions(-) create mode 100644 tests/skills/cases/meta-compile/document-journal-full.json create mode 100644 tests/skills/cases/meta-compile/snapshots/document-journal-full/Configuration.xml create mode 100644 tests/skills/cases/meta-compile/snapshots/document-journal-full/DocumentJournals/ДвиженияДенег.xml create mode 100644 tests/skills/cases/meta-compile/snapshots/document-journal-full/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/meta-compile/snapshots/document-journal-full/Languages/Русский.xml diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1 index e3bfd801..6a09f761 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.ps1 +++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1 @@ -1,4 +1,4 @@ -# meta-compile v1.54 — Compile 1C metadata object from JSON +# meta-compile v1.55 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -2867,45 +2867,32 @@ function Emit-DocumentJournalProperties { X "$i$(Esc-Xml $objName)" Emit-MLText $i "Synonym" $synonym - X "$i" + if ($def.comment) { X "$i$(Esc-XmlText $def.comment)" } else { X "$i" } - $defaultForm = if ($def.defaultForm) { "$($def.defaultForm)" } else { "" } - if ($defaultForm) { X "$i$defaultForm" } else { X "$i" } + Emit-VerbatimRef $i "DefaultForm" $def.defaultForm + Emit-VerbatimRef $i "AuxiliaryForm" $def.auxiliaryForm + $useStdCmds = if (Get-BoolProp "useStandardCommands" $true) { "true" } else { "false" } + X "$i$useStdCmds" - $auxForm = if ($def.auxiliaryForm) { "$($def.auxiliaryForm)" } else { "" } - if ($auxForm) { X "$i$auxForm" } else { X "$i" } - - X "$itrue" - - # RegisteredDocuments + # RegisteredDocuments — регистрируемые документы (список MDObjectRef, прощающий ввод русских корней). $regDocs = @() if ($def.registeredDocuments) { $regDocs = @($def.registeredDocuments) } if ($regDocs.Count -gt 0) { X "$i" - foreach ($rd in $regDocs) { - $rdStr = "$rd" - # Resolve Russian synonyms: Документ.Xxx → Document.Xxx - if ($rdStr.Contains('.')) { - $dotIdx = $rdStr.IndexOf('.') - $rdPrefix = $rdStr.Substring(0, $dotIdx) - $rdSuffix = $rdStr.Substring($dotIdx + 1) - if ($script:objectTypeSynonyms.ContainsKey($rdPrefix)) { - $rdPrefix = $script:objectTypeSynonyms[$rdPrefix] - } - $rdStr = "$rdPrefix.$rdSuffix" - } - X "$i`t$rdStr" - } + foreach ($rd in $regDocs) { X "$i`t$(Esc-Xml (Normalize-MDObjectRef "$rd"))" } X "$i" } else { X "$i" } + $inclHelp = if (Get-BoolProp "includeHelpInContents" $false) { "true" } else { "false" } + X "$i$inclHelp" + Emit-StandardAttributes $i "DocumentJournal" - X "$i" - X "$i" - X "$i" + Emit-MLText $i "ListPresentation" $def.listPresentation + Emit-MLText $i "ExtendedListPresentation" $def.extendedListPresentation + Emit-MLText $i "Explanation" $def.explanation } # --- 13d. Wave 4: ChartOfAccounts, AccountingRegister, ChartOfCalculationTypes, CalculationRegister --- @@ -3407,7 +3394,8 @@ function Emit-Column { $uuid = New-Guid-String $name = "" - $synonym = "" + $synonym = $null + $comment = "" $indexing = "DontIndex" $references = @() @@ -3416,7 +3404,8 @@ function Emit-Column { $synonym = Split-CamelCase $name } else { $name = "$($colDef.name)" - $synonym = if ($colDef.synonym) { "$($colDef.synonym)" } else { Split-CamelCase $name } + $synonym = if ($null -ne $colDef.synonym) { $colDef.synonym } else { Split-CamelCase $name } # строка ИЛИ {ru,en} + if ($colDef.comment) { $comment = "$($colDef.comment)" } if ($colDef.indexing) { $indexing = "$($colDef.indexing)" } if ($colDef.references) { $references = @($colDef.references) } } @@ -3425,12 +3414,12 @@ function Emit-Column { X "$indent`t" X "$indent`t`t$(Esc-Xml $name)" Emit-MLText "$indent`t`t" "Synonym" $synonym - X "$indent`t`t" + if ($comment) { X "$indent`t`t$(Esc-XmlText $comment)" } else { X "$indent`t`t" } X "$indent`t`t$indexing" if ($references.Count -gt 0) { X "$indent`t`t" foreach ($ref in $references) { - X "$indent`t`t`t$ref" + X "$indent`t`t`t$(Esc-Xml (Normalize-MDObjectRef "$ref"))" } X "$indent`t`t" } else { @@ -3810,16 +3799,27 @@ if ($objType -in @("InformationRegister","AccumulationRegister","AccountingRegis } } -# --- DocumentJournal: columns --- +# --- DocumentJournal: columns + commands --- if ($objType -eq "DocumentJournal") { $columns = @() if ($def.columns) { $columns = @($def.columns) } - if ($columns.Count -gt 0) { + $djCommands = @() + if ($def.commands) { + if ($def.commands -is [array] -or $def.commands.GetType().Name -eq 'Object[]') { + foreach ($c in $def.commands) { $djCommands += @{ name = "$($c.name)"; def = $c } } + } else { + $def.commands.PSObject.Properties | ForEach-Object { $djCommands += @{ name = $_.Name; def = $_.Value } } + } + } + if ($columns.Count -gt 0 -or $djCommands.Count -gt 0) { $hasChildren = $true X "`t`t" foreach ($col in $columns) { Emit-Column "`t`t`t" $col } + foreach ($cmd in $djCommands) { + Emit-Command "`t`t`t" $cmd.name $cmd.def + } X "`t`t" } else { X "`t`t" diff --git a/.claude/skills/meta-compile/scripts/meta-compile.py b/.claude/skills/meta-compile/scripts/meta-compile.py index 5a03f2a0..713101d4 100644 --- a/.claude/skills/meta-compile/scripts/meta-compile.py +++ b/.claude/skills/meta-compile/scripts/meta-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# meta-compile v1.54 — Compile 1C metadata object from JSON +# meta-compile v1.55 — Compile 1C metadata object from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse @@ -2817,38 +2817,28 @@ def emit_document_journal_properties(indent): i = indent X(f'{i}{esc_xml(obj_name)}') emit_mltext(i, 'Synonym', synonym) - X(f'{i}') - default_form = str(defn['defaultForm']) if defn.get('defaultForm') else '' - if default_form: - X(f'{i}{default_form}') + if defn.get('comment'): + X(f'{i}{esc_xml_text(str(defn["comment"]))}') else: - X(f'{i}') - aux_form = str(defn['auxiliaryForm']) if defn.get('auxiliaryForm') else '' - if aux_form: - X(f'{i}{aux_form}') - else: - X(f'{i}') - X(f'{i}true') + X(f'{i}') + emit_verbatim_ref(i, 'DefaultForm', defn.get('defaultForm')) + emit_verbatim_ref(i, 'AuxiliaryForm', defn.get('auxiliaryForm')) + use_std_cmds = 'true' if get_bool_prop('useStandardCommands', True) else 'false' + X(f'{i}{use_std_cmds}') reg_docs = list(defn.get('registeredDocuments', [])) if reg_docs: X(f'{i}') for rd in reg_docs: - rd_str = str(rd) - if '.' in rd_str: - dot_idx = rd_str.index('.') - rd_prefix = rd_str[:dot_idx] - rd_suffix = rd_str[dot_idx + 1:] - if rd_prefix in object_type_synonyms: - rd_prefix = object_type_synonyms[rd_prefix] - rd_str = f'{rd_prefix}.{rd_suffix}' - X(f'{i}\t{rd_str}') + X(f'{i}\t{esc_xml(normalize_md_object_ref(str(rd)))}') X(f'{i}') else: X(f'{i}') + incl_help = 'true' if get_bool_prop('includeHelpInContents', False) else 'false' + X(f'{i}{incl_help}') emit_standard_attributes(i, 'DocumentJournal') - X(f'{i}') - X(f'{i}') - X(f'{i}') + emit_mltext(i, 'ListPresentation', defn.get('listPresentation')) + emit_mltext(i, 'ExtendedListPresentation', defn.get('extendedListPresentation')) + emit_mltext(i, 'Explanation', defn.get('explanation')) def resolve_type_prefix_syn(ref): """Ссылка на объект: русский префикс типа → английский (ПланВидовХарактеристик.X → ChartOfCharacteristicTypes.X).""" @@ -3285,7 +3275,8 @@ def emit_web_service_properties(indent): def emit_column(indent, col_def): uid = new_uuid() name = '' - col_synonym = '' + col_synonym = None + comment = '' indexing = 'DontIndex' references = [] if isinstance(col_def, str): @@ -3293,7 +3284,9 @@ def emit_column(indent, col_def): col_synonym = split_camel_case(name) else: name = str(col_def.get('name', '')) - col_synonym = str(col_def['synonym']) if col_def.get('synonym') else split_camel_case(name) + col_synonym = col_def['synonym'] if col_def.get('synonym') is not None else split_camel_case(name) # строка ИЛИ {ru,en} + if col_def.get('comment'): + comment = str(col_def['comment']) if col_def.get('indexing'): indexing = str(col_def['indexing']) if col_def.get('references'): @@ -3302,12 +3295,15 @@ def emit_column(indent, col_def): X(f'{indent}\t') X(f'{indent}\t\t{esc_xml(name)}') emit_mltext(f'{indent}\t\t', 'Synonym', col_synonym) - X(f'{indent}\t\t') + if comment: + X(f'{indent}\t\t{esc_xml_text(comment)}') + else: + X(f'{indent}\t\t') X(f'{indent}\t\t{indexing}') if references: X(f'{indent}\t\t') for ref in references: - X(f'{indent}\t\t\t{ref}') + X(f'{indent}\t\t\t{esc_xml(normalize_md_object_ref(str(ref)))}') X(f'{indent}\t\t') else: X(f'{indent}\t\t') @@ -3659,14 +3655,25 @@ if obj_type in ('InformationRegister', 'AccumulationRegister', 'AccountingRegist else: X('\t\t') -# --- DocumentJournal: columns --- +# --- DocumentJournal: columns + commands --- if obj_type == 'DocumentJournal': columns = list(defn.get('columns', [])) - if columns: + dj_commands = [] + if defn.get('commands'): + cd = defn['commands'] + if isinstance(cd, list): + for c in cd: + dj_commands.append({'name': str(c.get('name', '')), 'def': c}) + else: + for k, v in cd.items(): + dj_commands.append({'name': k, 'def': v}) + if columns or dj_commands: has_children = True X('\t\t') for col in columns: emit_column('\t\t\t', col) + for cmd in dj_commands: + emit_command('\t\t\t', cmd['name'], cmd['def']) X('\t\t') else: X('\t\t') diff --git a/.claude/skills/meta-decompile/scripts/meta-decompile.ps1 b/.claude/skills/meta-decompile/scripts/meta-decompile.ps1 index db280c50..32d472d7 100644 --- a/.claude/skills/meta-decompile/scripts/meta-decompile.ps1 +++ b/.claude/skills/meta-decompile/scripts/meta-decompile.ps1 @@ -1,4 +1,4 @@ -# meta-decompile v0.45 — XML объекта метаданных 1С → JSON-черновик формата meta-compile +# meta-decompile v0.46 — XML объекта метаданных 1С → JSON-черновик формата meta-compile # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills # # Поддержаны: Catalog, ExchangePlan, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, Document, @@ -92,8 +92,8 @@ foreach ($c in $rootEl.ChildNodes) { if ($c.NodeType -eq 'Element') { $objNode = if (-not $objNode) { [Console]::Error.WriteLine("meta-decompile: пустой MetaDataObject"); exit 3 } $objType = $objNode.LocalName -if ($objType -notin @('Catalog', 'ExchangePlan', 'ChartOfCharacteristicTypes', 'ChartOfAccounts', 'ChartOfCalculationTypes', 'Document', 'InformationRegister', 'AccumulationRegister', 'AccountingRegister', 'CalculationRegister', 'BusinessProcess', 'Task', 'Enum', 'Report', 'DataProcessor', 'Constant', 'DefinedType', 'FunctionalOption')) { - [Console]::Error.WriteLine("meta-decompile: тип '$objType' пока не поддержан (Catalog, ExchangePlan, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, Document, InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister, BusinessProcess, Task, Enum, Report, DataProcessor, Constant, DefinedType, FunctionalOption)"); exit 3 +if ($objType -notin @('Catalog', 'ExchangePlan', 'ChartOfCharacteristicTypes', 'ChartOfAccounts', 'ChartOfCalculationTypes', 'Document', 'InformationRegister', 'AccumulationRegister', 'AccountingRegister', 'CalculationRegister', 'BusinessProcess', 'Task', 'Enum', 'Report', 'DataProcessor', 'Constant', 'DefinedType', 'FunctionalOption', 'DocumentJournal')) { + [Console]::Error.WriteLine("meta-decompile: тип '$objType' пока не поддержан (Catalog, ExchangePlan, ChartOfCharacteristicTypes, ChartOfAccounts, ChartOfCalculationTypes, Document, InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister, BusinessProcess, Task, Enum, Report, DataProcessor, Constant, DefinedType, FunctionalOption, DocumentJournal)"); exit 3 } $props = $objNode.SelectSingleNode('md:Properties', $nsm) @@ -609,6 +609,16 @@ if ($objType -eq 'FunctionalOption') { if ($items.Count -gt 0) { $dsl['content'] = [System.Collections.ArrayList]@($items) } } } +# DocumentJournal — журнал документов: формы (плоские ref) + регистрируемые документы. Колонки → ChildObjects (ниже). +if ($objType -eq 'DocumentJournal') { + $dfm = P 'DefaultForm'; if ($dfm) { $dsl['defaultForm'] = $dfm } + $afm = P 'AuxiliaryForm'; if ($afm) { $dsl['auxiliaryForm'] = $afm } + $rdNode = $props.SelectSingleNode('md:RegisteredDocuments', $nsm) + if ($rdNode) { + $rdItems = @($rdNode.SelectNodes('xr:Item', $nsm) | ForEach-Object { $_.InnerText }) + if ($rdItems.Count -gt 0) { $dsl['registeredDocuments'] = [System.Collections.ArrayList]@($rdItems) } + } +} # Constant — богатый одиночный реквизит: Type + свойства значения (как у реквизита) + object-уровень. if ($objType -eq 'Constant') { $vt = Get-TypeShorthand ($props.SelectSingleNode('md:Type', $nsm)) @@ -797,6 +807,7 @@ $stdFixedByType = @{ 'ChartOfCalculationTypes' = @('PredefinedDataName','Predefined','Ref','DeletionMark','ActionPeriodIsBasic','Description','Code') 'Document' = @('Ref','DeletionMark','Date','Number','Posted') 'Enum' = @('Order','Ref') + 'DocumentJournal' = @('Type','Ref','Date','Posted','DeletionMark','Number') } $stdFixed = if ($stdFixedByType.ContainsKey($objType)) { $stdFixedByType[$objType] } else { @() } # Условные типы: блок эмитим-как-триггер даже пустым (материализуется при отклонении ≥1 реквизита от schema-default; @@ -854,7 +865,7 @@ if ($saNode) { } # Условный тип (Catalog): пустой $saMap = триггер блока. Не-условный (ExchangePlan): блок и так эмитится → пустой не пишем. if ($saMap.Count -gt 0 -or ($stdConditionalTypes -contains $objType)) { $dsl['standardAttributes'] = $saMap } -} elseif ($objType -in @('InformationRegister', 'AccumulationRegister', 'AccountingRegister', 'CalculationRegister', 'BusinessProcess', 'Task', 'Enum')) { +} elseif ($objType -in @('InformationRegister', 'AccumulationRegister', 'AccountingRegister', 'CalculationRegister', 'BusinessProcess', 'Task', 'Enum', 'DocumentJournal')) { # Регистр/БП/Задача опускают all-default блок стандартных реквизитов (правило не выводимо) — компилятор эмитит его # по дефолту, поэтому отсутствие фиксируем opt-out `standardAttributes:""` (дом-конвенция суппресса). $dsl['standardAttributes'] = '' @@ -897,6 +908,30 @@ if ($childObjs) { } $dsl['values'] = $evArr } + # DocumentJournal: колонки. Каждая — object {name, synonym?, comment?, indexing?, references[]}. + # References — список MDObjectRef-путей к реквизитам регистрируемых документов (verbatim). + $colNodes = @($childObjs.SelectNodes('md:Column', $nsm)) + if ($colNodes.Count -gt 0) { + $colArr = [System.Collections.ArrayList]@() + foreach ($col in $colNodes) { + $cp = $col.SelectSingleNode('md:Properties', $nsm) + $cName = ($cp.SelectSingleNode('md:Name', $nsm)).InnerText + $o = [ordered]@{ name = $cName } + $cSynNode = $cp.SelectSingleNode('md:Synonym', $nsm) + $cSyn = Get-MLValue $cSynNode + if ($cSyn -is [string]) { if ($cSyn -ne (Split-CamelWords $cName)) { $o['synonym'] = $cSyn } } + elseif ($null -ne $cSyn) { $o['synonym'] = $cSyn } + elseif ($cSynNode) { $o['synonym'] = '' } # пустой ≠ авто-синоним → явный '' + $cCmtN = $cp.SelectSingleNode('md:Comment', $nsm); if ($cCmtN -and $cCmtN.InnerText) { $o['comment'] = $cCmtN.InnerText } + $cIdxN = $cp.SelectSingleNode('md:Indexing', $nsm); if ($cIdxN -and $cIdxN.InnerText -ne 'DontIndex') { $o['indexing'] = $cIdxN.InnerText } + $cRefNode = $cp.SelectSingleNode('md:References', $nsm) + $refs = [System.Collections.ArrayList]@() + if ($cRefNode) { foreach ($it in @($cRefNode.SelectNodes('xr:Item', $nsm))) { [void]$refs.Add($it.InnerText) } } + $o['references'] = $refs + [void]$colArr.Add($o) + } + $dsl['columns'] = $colArr + } # ChartOfAccounts: признаки учёта (AccountingFlag) и признаки учёта субконто (ExtDimensionAccountingFlag) — # структурно как реквизит, захватываем тем же Attr-ToDsl (тип Boolean уходит в короткую запись). $acctFlagNodes = @($childObjs.SelectNodes('md:AccountingFlag', $nsm)) diff --git a/docs/meta-dsl-spec.md b/docs/meta-dsl-spec.md index a4a1bab2..dcf4739d 100644 --- a/docs/meta-dsl-spec.md +++ b/docs/meta-dsl-spec.md @@ -1152,27 +1152,38 @@ ChildObjects и модулей. } ``` -### 7.15 DocumentJournal +### 7.15 DocumentJournal (Журнал документов) + +Журнал документов: список регистрируемых документов (RegisteredDocuments) + колонки (Column) со ссылками на +реквизиты этих документов. Стандартные реквизиты — Type/Ref/Date/Posted/DeletionMark/Number. | Поле JSON | Умолчание | XML элемент | |-----------|----------|-------------| -| `defaultForm` | `""` | DefaultForm | -| `auxiliaryForm` | `""` | AuxiliaryForm | -| `registeredDocuments` | `[]` | RegisteredDocuments | +| `comment` | пусто | Comment | +| `defaultForm` / `auxiliaryForm` | `""` | DefaultForm / AuxiliaryForm (ссылка verbatim) | +| `useStandardCommands` | `true` | UseStandardCommands | +| `registeredDocuments` | `[]` | RegisteredDocuments — массив MDObjectRef `"Document.Имя"` (прощающий ввод русских корней) | +| `includeHelpInContents` | `false` | IncludeHelpInContents | +| `standardAttributes` | (блок всегда) | `""` — opt-out (~7% журналов опускают); кастомизация Date/… как в §7.1.1 | +| `listPresentation` / `extendedListPresentation` / `explanation` | пусто | презентации (ML) | | `columns` | `[]` | → Column в ChildObjects | +| `commands` | `[]` | → Command в ChildObjects (§7.1.3) | -Без модулей. +**Колонка (`columns[]`)** — объект `{name, synonym?, comment?, indexing?, references[]}`: +- `references` — массив MDObjectRef-путей к реквизитам регистрируемых документов + (`Document.X.Attribute.Y` / `Document.X.TabularSection.Z.Attribute.Y`); прощающий ввод русских корней; +- `indexing` — `DontIndex` (дефолт) / `Index` / `IndexWithAdditionalOrder`; +- `synonym: ""` — явно пустой синоним (когда авто из имени неуместен). -DSL для `registeredDocuments` — массив строк `"Document.ИмяДокумента"` (или русский `"Документ.ИмяДокумента"`). - -DSL для `columns` (§12). +`registeredDocuments`/`references` и `defaultForm` — прощающий ввод русских корней метаданных/подвидов +(Документ→Document, Реквизит→Attribute, ТабличнаяЧасть→TabularSection); имена объектов не трогаются. ```json -{ - "type": "DocumentJournal", "name": "Взаимодействия", - "registeredDocuments": ["Document.Встреча", "Document.ТелефонныйЗвонок"], - "columns": [{ "name": "Организация", "indexing": "Index", "references": ["Document.Встреча.Attribute.Организация"] }] -} +{ "type": "DocumentJournal", "name": "ДвиженияДенег", + "registeredDocuments": ["Документ.ПоступлениеНаСчет", "Document.СписаниеСоСчета"], + "columns": [ + { "name": "Организация", "references": ["Документ.ПоступлениеНаСчет.Реквизит.Организация"] }, + { "name": "Сумма", "indexing": "Index", "references": ["Document.ПоступлениеНаСчет.Attribute.Сумма"] } ] } ``` ### 7.16 ChartOfAccounts diff --git a/tests/skills/cases/meta-compile/document-journal-full.json b/tests/skills/cases/meta-compile/document-journal-full.json new file mode 100644 index 00000000..052b2d51 --- /dev/null +++ b/tests/skills/cases/meta-compile/document-journal-full.json @@ -0,0 +1,32 @@ +{ + "name": "Журнал документов с колонками", + "input": { + "type": "DocumentJournal", + "name": "ДвиженияДенег", + "comment": "(Демо)", + "defaultForm": "DocumentJournal.ДвиженияДенег.Form.ФормаСписка", + "registeredDocuments": [ + "Документ.ПоступлениеНаСчет", + "Document.СписаниеСоСчета" + ], + "columns": [ + { + "name": "Организация", + "references": [ + "Документ.ПоступлениеНаСчет.Реквизит.Организация", + "Document.СписаниеСоСчета.Attribute.Организация" + ] + }, + { + "name": "Сумма", + "indexing": "Index", + "synonym": "", + "references": ["Document.ПоступлениеНаСчет.Attribute.Сумма"] + } + ] + }, + "validatePath": "DocumentJournals/ДвиженияДенег", + "expect": { + "files": ["DocumentJournals/ДвиженияДенег.xml"] + } +} diff --git a/tests/skills/cases/meta-compile/snapshots/document-journal-full/Configuration.xml b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Configuration.xml new file mode 100644 index 00000000..c084240b --- /dev/null +++ b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + ДвиженияДенег + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-compile/snapshots/document-journal-full/DocumentJournals/ДвиженияДенег.xml b/tests/skills/cases/meta-compile/snapshots/document-journal-full/DocumentJournals/ДвиженияДенег.xml new file mode 100644 index 00000000..9199fef3 --- /dev/null +++ b/tests/skills/cases/meta-compile/snapshots/document-journal-full/DocumentJournals/ДвиженияДенег.xml @@ -0,0 +1,228 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + + ДвиженияДенег + + + ru + Движения денег + + + (Демо) + DocumentJournal.ДвиженияДенег.Form.ФормаСписка + + true + + Document.ПоступлениеНаСчет + Document.СписаниеСоСчета + + false + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + + + + + + + Организация + + + ru + Организация + + + + DontIndex + + Document.ПоступлениеНаСчет.Attribute.Организация + Document.СписаниеСоСчета.Attribute.Организация + + + + + + Сумма + + + Index + + Document.ПоступлениеНаСчет.Attribute.Сумма + + + + + + diff --git a/tests/skills/cases/meta-compile/snapshots/document-journal-full/Ext/ClientApplicationInterface.xml b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-compile/snapshots/document-journal-full/Languages/Русский.xml b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/meta-compile/snapshots/document-journal-full/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/meta-compile/snapshots/document-journal/DocumentJournals/ЖурналСкладскихДокументов.xml b/tests/skills/cases/meta-compile/snapshots/document-journal/DocumentJournals/ЖурналСкладскихДокументов.xml index 8f24d739..c9526f01 100644 --- a/tests/skills/cases/meta-compile/snapshots/document-journal/DocumentJournals/ЖурналСкладскихДокументов.xml +++ b/tests/skills/cases/meta-compile/snapshots/document-journal/DocumentJournals/ЖурналСкладскихДокументов.xml @@ -31,6 +31,7 @@ Document.ПриходнаяНакладная Document.РасходнаяНакладная + false