- Update stock movement model with improved functionality
- Enhance inventory routes and API endpoints
- Improve inventory templates for movements, reports, and stock items
- Add better history tracking and valuation reporting
Add Peppol BIS Billing 3.0 (UBL) invoice sending via a configurable access point, including admin-configurable settings, per-invoice send history, and documentation/README updates.
Also introduce stock lots/allocations (valuation layers) with supporting inventory route/report/UI updates and hardened startup migration handling.
Some legacy/partially-upgraded databases already have one or more integration OAuth columns in settings (e.g. google_calendar_client_id). Only add missing columns and set defaults for columns that exist so upgrades don't fail with DuplicateColumn.
Bump version to 4.8.12.
Avoid DuplicateTable/duplicate index errors on partially-migrated databases by skipping creation of existing template tables (quote_templates, project_templates, time_entry_templates) and only creating missing indexes/columns.
Also bump version to 4.8.11.
Prevent Postgres upgrades from failing when alembic_version.version_num is too small for long revision IDs, and add an alias migration to bridge older installs that recorded '067_add_integration_credentials'.
Add new client portal pages (dashboard, approvals, notifications, documents, reports) and extend API/routes/services to support client approvals, invoices/quotes views, and related notifications.
Update email templates and docs; add/adjust tests for new models/routes.
- Rename 'metadata' column to 'extra_data' in ClientNotification model
to avoid SQLAlchemy Declarative API reserved word conflict
- Update ClientNotificationService to use 'extra_data' instead of 'metadata'
- Maintain API compatibility by returning 'metadata' key in to_dict() method
- Update migration to create 'extra_data' column instead of 'metadata'
- Improve migration idempotency and SQLite compatibility with proper checks
- Enhance backup directory handling with configurable BACKUP_FOLDER support
- Update admin routes to use centralized backup directory function
This fixes the application startup error:
sqlalchemy.exc.InvalidRequestError: Attribute name 'metadata' is reserved
when using the Declarative API.
The migration is now idempotent and handles both PostgreSQL and SQLite
databases safely.
Default admin backups to a writable, configurable folder (BACKUP_FOLDER/BACKUP_DIR, defaulting to /data/uploads/backups) to avoid permission denied errors in non-root containers.
Also update local-test compose and docs to reflect the backup location.
The migration was failing with DuplicateTable error when the table
already existed in the database. This can happen when:
- The table was created manually
- A previous migration attempt partially succeeded
- Database state is out of sync with Alembic version tracking
Changes:
- Add _has_table() helper to check table existence
- Add _has_index() helper to check index existence
- Make upgrade() idempotent by checking before creating
- Make downgrade() safe by checking before dropping
- Follow same pattern as other migrations (018, 037)
This allows the migration to run successfully even when the table
already exists, creating only missing indexes if needed.
- Refactor migrations with idempotency checks and better error handling
* Add SQLAlchemy inspector checks for table/column existence
* Improve error messages and handling for schema operations
* Make migrations safe to run multiple times
* Update 27 migration files with enhanced error handling patterns
- Add missing schema columns via new migrations
* Migration 095: Add ui_show_issues column to users table
* Migration 096: Add portal_issues_enabled column to clients table
- Enhance Settings model error handling
* Improve detection of schema errors (table/column missing)
* Better handling of SQLAlchemy exceptions during migrations
* More comprehensive error checking for OperationalErrors
- Fix database auto-switching logic in app initialization
* Respect explicit DATABASE_URL setting to prevent unwanted switches
* Only auto-switch to PostgreSQL when not explicitly configured
- Update docker entrypoint script with migration improvements
- Replace bg-white dark:bg-gray-800 with bg-card-light dark:bg-card-dark across all templates for consistent theming
- Fix layout rendering issues on multiple pages:
* Calendar - Calendar View
* Time Tracking - Projects, Weekly Goals, Time Entry Templates
* Tools & Data - Import/Export, Saved Filters
* Admin - Security Access (API Tokens), System Maintenance (Backups)
* User pages (Profile, Settings)
* Invoice, Quote, and Expense pages
* All component widgets and help pages
- Remove footer section from base.html to clean up page layout
- Remove unused footer script for setting current year
- Ensure consistent card styling across entire application for proper dark mode support
Affects 33 template files total.
- Add dedicated donation page (/donate) explaining why donations matter
- Implement DonationInteraction model to track user engagement and interactions
- Add smart banner logic with contextual messaging based on user milestones
- Improve donation accessibility with links in sidebar, footer, dashboard, and all major pages
- Add UTM tracking to all Buy Me a Coffee links for analytics
- Fix CSRF token issues in donation tracking JavaScript
- Enhance dashboard widget with user stats and dual action buttons
- Add donation information section to About page
- Update support banner with 'Learn More' and 'Donate' options
- Create database migration for donation_interactions table
The donation system now provides:
- Smart prompts that show after user milestones (7+ days, 50+ entries, 100+ hours)
- Banner dismissal tracking with 30-day cooldown
- Multiple access points throughout the application
- Better visibility of donation impact and importance
- Comprehensive tracking for analytics and optimization
- Fix tasks not being created when projects are created from templates
* Remove invalid status parameter from task creation (TaskService doesn't accept it)
* Fix estimated_hours conversion from string to float/None
* Add proper error handling for task creation failures
* Refresh template from database before reading tasks
- Fix missing tasks section in template edit form
* Add tasks section to edit template form with full CRUD functionality
* Display existing tasks when editing templates
* Allow adding, editing, and removing tasks in templates
- Fix tasks not being saved when creating/editing templates
* Fix JavaScript form handling to properly collect tasks from form
* Create tasks input field on page load and update on submit
* Add capture phase event listener to ensure tasks are set before form submission
* Ensure tasks are always saved as a list (never None)
- Fix [object Object] error in toast notifications
* Add safeguards to ensure flash messages are always strings
* Add object-to-string conversion in toast notification system
- Improve error handling and validation
* Add validation to ensure tasks is always a list
* Improve JSON parsing with better error handling
* Add safeguards for flash message handling
Convert None database values to empty strings in template to prevent 'None' text from appearing in form fields. This fixes an issue where users had to manually delete 'None' from URL and other optional fields before saving.
Updated fields: image_url, description, category, barcode, and notes to use 'or' filter for proper None handling.
Convert Supplier objects to dictionaries before passing to template to
prevent 'Object of type Supplier is not JSON serializable' error.
The template uses tojson filter to serialize suppliers for JavaScript,
but SQLAlchemy model objects are not directly JSON serializable. By
converting suppliers to dictionaries using to_dict() method before
rendering, the serialization now works correctly.
Fixes issue where editing stock items resulted in 500 server error.
Affects both new_stock_item and edit_stock_item routes.
- Remove confusing trello_token field from Trello setup (replaced with api_secret)
- Add required field indicators (*) and HTML validation for all OAuth credentials
- Add backend validation for required fields (Client ID, API Key, API Secret)
- Improve GitLab instance URL validation with proper defaults and URL format checking
- Enhance help text for Microsoft integrations (Outlook, Teams) tenant_id field
- Clarify when fields are required vs optional with better placeholder text
- Ensure setup pages only show necessary fields for each integration type
All integration setup pages now have:
- Clear required field indicators
- Proper validation (frontend and backend)
- Simplified, intuitive forms
- Better help text and instructions
- No unnecessary or confusing fields
Enhanced all integrations with complete setup procedures, authentication flows,
and comprehensive configuration management.
Base Connector Enhancements:
- Extended get_config_schema() with sections, sync settings, and validation
- Added validate_config() with type checking and constraints
- Added helper methods: get_sync_settings(), get_field_mappings(), get_status_mappings()
Integration Configuration Schemas:
- All integrations now have complete config schemas with organized sections
- Support for sync direction (Import/Export/Bidirectional)
- Sync scheduling options (Manual/Hourly/Daily/Weekly)
- Data mapping configuration (status mappings, field mappings)
- Field types: string, number, boolean, select, array, json, url, text, password
- Comprehensive help text and descriptions for all fields
Enhanced Integrations:
- Jira: JQL queries, status mapping, project auto-creation
- GitHub: Repository selection, issue state filtering, webhook security
- GitLab: Project selection, issue filtering, webhook configuration
- Slack: Channel selection, notification triggers
- Asana: Workspace/project selection, completion status sync
- Trello: Board selection, list-to-status mapping
- Microsoft Teams: Channel configuration, notification settings
- QuickBooks: Customer/item/account mappings, sandbox mode
- Xero: Contact/item/account mappings
- Google Calendar: Event formatting, date range controls
- Outlook Calendar: Event formatting, date range controls
- CalDAV: Server discovery, SSL verification, lookback/lookahead
UI Enhancements:
- Section-based configuration display
- Support for all field types (select, array, number, json, boolean)
- Improved help text and descriptions
- Better visual organization and validation
Route Enhancements:
- Config schema passed to template
- Form processing for all field types
- Proper default value handling
- Validation error messages
This provides a complete, user-friendly integration setup experience with
one-button OAuth connections, configurable sync settings, and data translation
capabilities.
- Add integration-specific configuration support via get_config_schema()
- Dynamic form generation for config fields (string, boolean, text, JSON, url)
- Save integration config to database (jira_url, jql, realm_id, etc.)
- Support for all field types with validation and help text
- Improve connection status visualization
- Enhanced status badges (Connected/Not Connected, Sync OK/Error)
- Display last sync timestamp and error messages
- Grid layout for better information hierarchy
- Clear visual feedback for connection health
- Enhance sync operations
- Update last_sync_at, last_sync_status, and last_error fields
- Log sync events with metadata to IntegrationEvent table
- Better error handling and user feedback
- Clean up integrations list page
- Remove duplicate 'Your Active Integrations' table section
- Keep only card-based view with all necessary information
- Simplified, cleaner interface
- Fix f-string syntax errors in QuickBooks connector
- Extract string replacements outside f-string expressions
- Fix lines 382 and 444 that prevented connector registration
- Update navigation and admin dashboard
- Move integrations link from admin menu to Tools & Data menu
- Update admin dashboard shortcut to new integrations route
All integrations now have full configuration UI support, better status
feedback, and improved user experience.
Remove both system-wide and per-user UI feature enable/disable settings
in favor of the centralized ModuleRegistry system for module management.
Changes:
- Remove ui_allow_* columns from Settings model and database (migration 093)
- Remove ui_show_* preference assignments from user settings route
- Remove UI Customization section from user settings template
- Remove UI Features section from admin settings template
- Update admin modules template to use ModuleRegistry instead of settings flags
- Remove settings_flag and user_flag attributes from ModuleDefinition
- Update ModuleRegistry.is_enabled() to only check dependencies and default_enabled
- Update dashboard template to use is_module_enabled() helper
- Update admin route docstring to reflect module management changes
Module visibility is now controlled exclusively via the admin module
management interface (/admin/modules), eliminating the need for separate
system-wide and per-user UI preference systems.
- Add centralized module registry system (ModuleRegistry) for managing
module metadata, dependencies, and visibility across the application
- Create module helper utilities with decorators (@module_enabled) and
helper functions for route protection and template access
- Add database migration (092) to add missing module visibility flags
to settings and users tables for granular control
- Extend Settings and User models with additional module visibility
flags for CRM, Finance, Tools, and Advanced features
- Implement admin module management UI for system-wide module
enable/disable controls
- Add module checks to routes (calendar, contacts, deals, expenses,
invoices, leads, custom_reports) to enforce visibility rules
- Update scheduled report service and report templates to respect
module visibility settings
- Bump version to 4.8.0 in setup.py
- Add comprehensive documentation for module integration planning
and implementation analysis