- Export: company_export.py exports all Link-to-Account fields as account_name
- Import: create_default_company_accounts() resolves account names to full accounts in new company, applied via setup_wizard_complete
- JS: Export Defaults button in Company list view downloads company_defaults.json
- default_data/company_defaults.json: initial defaults
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fields added as Small Text (TEXT in MySQL) to bypass tabEmployee's 65535-byte
row size limit. Added two pre_model_sync patches to fix row format and add
columns directly before Frappe schema sync runs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Select field 'Absence Reason' visible only when status is Absent,
with 12 predefined Azerbaijani-language absence reason options.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rewrote won/lost checkbox logic with clean code approach
- Removed complex HTML synchronization in favor of native Frappe checkboxes
- Added CSS to display checkboxes inline (side by side) instead of stacked
- Implemented automatic enforcement: one checkbox must always be selected
- Added client-side validation that auto-corrects invalid states
- Added server-side validation for gambling companies only
- Removed old column break and section break fields
- Fields now only validate for gambling company main activities
Changes:
- custom_fields.py: Simplified won/lost field definitions, removed HTML field
- sales_invoice_vat.js: Clean logic + CSS for inline display + auto-selection
- sales_invoice.py: Server validation with auto-correction
- hooks.py: Added validate_won_lost_fields hook
- patches: Added cleanup patches for old fields
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>