mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-12 08:54:57 +03:00
fix(cfe-borrow): strip DataPath from AutoCommandBar buttons in borrowed forms
ERP catalog forms (e.g. Номенклатура.ФормаЭлемента) have buttons inside AutoCommandBar with <DataPath>Объект.Ref</DataPath> — causes "Неверный путь к данным" on load. DataPath was only stripped from form-level ChildItems but not from AutoCommandBar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -509,6 +509,8 @@ function Borrow-Form {
|
||||
$autoCmdXml = $autoCmdXml -replace '<Autofill>true</Autofill>', '<Autofill>false</Autofill>'
|
||||
# Strip ExcludedCommand (references to standard commands invalid in extension)
|
||||
$autoCmdXml = [regex]::Replace($autoCmdXml, '\s*<ExcludedCommand>[^<]*</ExcludedCommand>', '')
|
||||
# Strip DataPath in AutoCommandBar buttons (e.g. Объект.Ref — invalid in extension)
|
||||
$autoCmdXml = [regex]::Replace($autoCmdXml, '\s*<DataPath>[^<]*</DataPath>', '')
|
||||
}
|
||||
|
||||
# ChildItems: copy full tree, clean up base-config references
|
||||
|
||||
@@ -680,6 +680,8 @@ def main():
|
||||
auto_cmd_xml = auto_cmd_xml.replace('<Autofill>true</Autofill>', '<Autofill>false</Autofill>')
|
||||
# Strip ExcludedCommand (references to standard commands invalid in extension)
|
||||
auto_cmd_xml = re.sub(r'\s*<ExcludedCommand>[^<]*</ExcludedCommand>', '', auto_cmd_xml)
|
||||
# Strip DataPath in AutoCommandBar buttons (e.g. Объект.Ref — invalid in extension)
|
||||
auto_cmd_xml = re.sub(r'\s*<DataPath>[^<]*</DataPath>', '', auto_cmd_xml)
|
||||
|
||||
# ChildItems: copy full tree, clean up base-config references
|
||||
child_items_xml = ""
|
||||
|
||||
Reference in New Issue
Block a user