fix(meta-compile): strip FillFromFillingValue/FillValue/DataHistory for Chart* attributes

ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes
attributes don't support FillFromFillingValue, FillValue, DataHistory
properties — platform rejects them with "Неверное свойство объекта
метаданных". Add "chart" context to Emit-Attribute to skip these.

Found via platform snapshot verification (Finding A1).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-04-05 20:11:47 +03:00
parent 20adf4f463
commit 3ba6072660
4 changed files with 18 additions and 16 deletions
@@ -1,4 +1,4 @@
# meta-compile v1.5 — Compile 1C metadata object from JSON
# meta-compile v1.6 — Compile 1C metadata object from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[Parameter(Mandatory)]
@@ -789,13 +789,13 @@ function Emit-Attribute {
X "$indent`t`t<MinValue xsi:nil=`"true`"/>"
X "$indent`t`t<MaxValue xsi:nil=`"true`"/>"
# FillFromFillingValue — not for tabular/processor (non-stored objects don't have these)
if ($context -notin @("tabular", "processor")) {
# FillFromFillingValue — not for tabular/processor/chart (Chart* types don't support these)
if ($context -notin @("tabular", "processor", "chart")) {
X "$indent`t`t<FillFromFillingValue>false</FillFromFillingValue>"
}
# FillValue — not for tabular/processor
if ($context -notin @("tabular", "processor")) {
# FillValue — not for tabular/processor/chart
if ($context -notin @("tabular", "processor", "chart")) {
Emit-FillValue "$indent`t`t" $typeStr
}
@@ -828,7 +828,10 @@ function Emit-Attribute {
X "$indent`t`t<Indexing>$indexing</Indexing>"
X "$indent`t`t<FullTextSearch>Use</FullTextSearch>"
X "$indent`t`t<DataHistory>Use</DataHistory>"
# DataHistory — not for Chart* types (ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes)
if ($context -ne "chart") {
X "$indent`t`t<DataHistory>Use</DataHistory>"
}
}
X "$indent`t</Properties>"
@@ -2633,6 +2636,7 @@ if ($objType -in $typesWithAttrTS) {
"Catalog" { "catalog" }
"Document" { "document" }
{ $_ -in @("DataProcessor","Report") } { "processor" }
{ $_ -in @("ChartOfAccounts","ChartOfCharacteristicTypes","ChartOfCalculationTypes") } { "chart" }
default { "object" }
}
foreach ($a in $attrs) {
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# meta-compile v1.5 — Compile 1C metadata object from JSON
# meta-compile v1.6 — Compile 1C metadata object from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
@@ -747,9 +747,9 @@ def emit_attribute(indent, parsed, context):
X(f'{indent}\t\t<ExtendedEdit>false</ExtendedEdit>')
X(f'{indent}\t\t<MinValue xsi:nil="true"/>')
X(f'{indent}\t\t<MaxValue xsi:nil="true"/>')
if context not in ('tabular', 'processor'):
if context not in ('tabular', 'processor', 'chart'):
X(f'{indent}\t\t<FillFromFillingValue>false</FillFromFillingValue>')
if context not in ('tabular', 'processor'):
if context not in ('tabular', 'processor', 'chart'):
emit_fill_value(f'{indent}\t\t', type_str)
fill_checking = 'DontCheck'
if 'req' in parsed.get('flags', []):
@@ -777,7 +777,9 @@ def emit_attribute(indent, parsed, context):
indexing = parsed['indexing']
X(f'{indent}\t\t<Indexing>{indexing}</Indexing>')
X(f'{indent}\t\t<FullTextSearch>Use</FullTextSearch>')
X(f'{indent}\t\t<DataHistory>Use</DataHistory>')
# DataHistory — not for Chart* types (ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes)
if context != 'chart':
X(f'{indent}\t\t<DataHistory>Use</DataHistory>')
X(f'{indent}\t</Properties>')
X(f'{indent}</Attribute>')
@@ -2305,6 +2307,8 @@ if obj_type in types_with_attr_ts:
context = 'document'
elif obj_type in ('DataProcessor', 'Report'):
context = 'processor'
elif obj_type in ('ChartOfAccounts', 'ChartOfCharacteristicTypes', 'ChartOfCalculationTypes'):
context = 'chart'
else:
context = 'object'
for a in attrs:
@@ -308,8 +308,6 @@
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:type="xs:string"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<ChoiceParameterLinks/>
@@ -321,7 +319,6 @@
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<Indexing>DontIndex</Indexing>
<FullTextSearch>Use</FullTextSearch>
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
</ChildObjects>
@@ -340,8 +340,6 @@
<ExtendedEdit>false</ExtendedEdit>
<MinValue xsi:nil="true"/>
<MaxValue xsi:nil="true"/>
<FillFromFillingValue>false</FillFromFillingValue>
<FillValue xsi:type="xs:string"/>
<FillChecking>DontCheck</FillChecking>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<ChoiceParameterLinks/>
@@ -353,7 +351,6 @@
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
<Indexing>DontIndex</Indexing>
<FullTextSearch>Use</FullTextSearch>
<DataHistory>Use</DataHistory>
</Properties>
</Attribute>
</ChildObjects>