mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-04 18:50:23 +03:00
fix(form-add,cf-init,cfe-init): ExtendedPresentation + InterfaceCompatibilityMode
- form-add v1.2: ExtendedPresentation only for DataProcessor/Report/External* forms (Catalogs, Documents, Registers etc. don't have this property — platform rejects it) - cf-init v1.1: InterfaceCompatibilityMode Taxi → TaxiEnableVersion8_2 (matches all real configs: acc 8.3.20/24/27, erp 8.3.24) - cfe-init v1.1: read InterfaceCompatibilityMode from -ConfigPath base config (analogous to existing CompatibilityMode auto-detection) - Remove workaround in platform-cfe integration test (cf-edit modify-property) - Update 162 snapshot Configuration.xml + 7 form metadata snapshots Tests: 301/301 passed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
29a5cbae4c
commit
72bad1aaaa
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# cfe-init v1.0 — Create 1C configuration extension scaffold (CFE)
|
||||
# cfe-init v1.1 — Create 1C configuration extension scaffold (CFE)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
"""Generates minimal XML source files for a 1C configuration extension."""
|
||||
import sys, os, argparse, uuid
|
||||
@@ -84,7 +84,7 @@ def main():
|
||||
else:
|
||||
print(f"[WARN] Base config language not found: {base_lang_file}")
|
||||
|
||||
# Read CompatibilityMode from base config
|
||||
# Read CompatibilityMode and InterfaceCompatibilityMode from base config
|
||||
try:
|
||||
base_cfg_tree = ET.parse(os.path.abspath(config_path))
|
||||
base_cfg_root = base_cfg_tree.getroot()
|
||||
@@ -95,9 +95,18 @@ def main():
|
||||
print(f"[INFO] Base config CompatibilityMode: {compat}")
|
||||
else:
|
||||
print(f"[WARN] CompatibilityMode not found in base config, using default: {compat}")
|
||||
ifc_node = base_cfg_root.find('.//md:Configuration/md:Properties/md:InterfaceCompatibilityMode', ns)
|
||||
if ifc_node is not None and ifc_node.text:
|
||||
ifc_mode = ifc_node.text.strip()
|
||||
print(f"[INFO] Base config InterfaceCompatibilityMode: {ifc_mode}")
|
||||
else:
|
||||
ifc_mode = "TaxiEnableVersion8_2"
|
||||
print(f"[WARN] InterfaceCompatibilityMode not found in base config, using default: {ifc_mode}")
|
||||
except Exception:
|
||||
print(f"[WARN] Could not parse base config, using default CompatibilityMode: {compat}")
|
||||
ifc_mode = "TaxiEnableVersion8_2"
|
||||
else:
|
||||
ifc_mode = "TaxiEnableVersion8_2"
|
||||
print("[WARN] Language ExtendedConfigurationObject set to zeros. Use -ConfigPath to auto-resolve from base config, or fix manually before loading.")
|
||||
|
||||
# --- Generate UUIDs ---
|
||||
@@ -173,7 +182,7 @@ def main():
|
||||
\t\t\t<Copyright/>
|
||||
\t\t\t<VendorInformationAddress/>
|
||||
\t\t\t<ConfigurationInformationAddress/>
|
||||
\t\t\t<InterfaceCompatibilityMode>TaxiEnableVersion8_2</InterfaceCompatibilityMode>
|
||||
\t\t\t<InterfaceCompatibilityMode>{ifc_mode}</InterfaceCompatibilityMode>
|
||||
\t\t</Properties>
|
||||
\t\t<ChildObjects>{child_objects_xml}</ChildObjects>
|
||||
\t</Configuration>
|
||||
|
||||
Reference in New Issue
Block a user