tab_hierarchy stores raw (English) Tab Break labels, but Frappe renders
tab text through __(), so under AZ/RU the DOM text never equals the
hierarchy key and subtabs silently stay flat (e.g. E-Taxes Settings,
Bank Integration Profile). Doctypes with native-AZ labels were unaffected.
Compare DOM tab text against tr(key) at the matching boundary; keep all
internal bookkeeping (childToParentMap, data-subtab-name) in English so
clicks and parent-chain reveal stay consistent across languages.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Problem:
- boot_session_handler was failing silently for some DocTypes
- Direct access to field.js_parent_subtab caused AttributeError
- DocTypes with errors prevented entire hierarchy from being built
Solution:
- Added try-except around DocType processing loop
- Changed field.js_parent_subtab to getattr(field, 'js_parent_subtab', None)
- Errors are logged but don't break the entire boot process
Result:
- All DocTypes with subtabs now properly included in tab_hierarchy
- "Declaration of value added tax" and similar DocTypes now work correctly
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Problem:
- When switching to a tab without subtabs, the subtab text was hidden
- But the container remained visible with border and took up space
- Invisible buttons were still clickable and could switch to previous subtabs
- Cursor changed to pointer over the invisible container
Solution:
- Changed logic to hide/show entire .sub-tab-container instead of individual .sub-tab elements
- Now container is completely removed from layout when not active
- Prevents phantom clicks and visual artifacts
Changed in custom_subtabs.js (lines 192, 194):
- Before: $(this).find(".sub-tab").show/hide()
- After: $(this).show/hide()
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added frappe.reload_doc() after modifying docfield.json
- Added frappe.clear_cache() to ensure changes are applied
- Now patch automatically syncs JSON changes to database
- Fixed issue where js_parent_subtab field existed in JSON but not in DB
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>