- Add oidc_metadata.py utility module with retry logic and DNS testing
- Implement fetch_oidc_metadata() with exponential backoff retry
- Add test_dns_resolution() for proactive DNS diagnostics
- Create TROUBLESHOOTING_OIDC_DNS.md documentation
- Improves handling of DNS resolution errors in containerized environments
- Add issue creation functionality with new route and template
* Implement new_issue() route with validation and permission checks
* Create issues/new.html template for issue creation form
* Add 'Create Issue' button to issues list with permission check
- Enhance inventory stock movement validation
* Improve devaluation validation with proper error messages
* Add stock availability checks before devaluation operations
* Validate devaluation methods (percent/fixed) with proper bounds checking
* Add better error handling for return and waste movements with devaluation
* Improve user feedback with specific success messages
- Refine permission system for better granular control
* Add comprehensive issue permissions (view_all_issues, view_own_issues, create_issues, edit_all_issues, edit_own_issues, delete_issues)
* Add manage_payment_gateways permission
* Update payment gateway routes to use manage_payment_gateways instead of admin_access
* Assign new permissions to appropriate roles (admin, manager)
* Add permission checks to UI elements (inventory menu, delete project button)
- Fix permission checks in templates
* Update payment gateway list template to use correct permission
* Add permission check for project delete button
* Add permission check for inventory menu visibility
- Remove requirement for default_project_id in CalDAV sync
- Update config schema to mark default_project_id as optional
- Allow importing calendar events without a project assigned
- Update setup form to show project selection as optional
- Remove disabled state from submit button when no projects exist
- Fix number field handling to allow None values for optional fields
- Update sync logic to handle events without project assignment
- Add allow_admin_override parameter to get_integration() method
- Allow admins to view, test, and sync per-user integrations
- Fix 'Integration not found' errors for admins accessing CalDAV
- Update all integration routes to pass allow_admin_override flag
Add comprehensive input validation and sanitization to prevent
invalid data entry and improve security. This includes:
For tasks:
- Validate and sanitize task names with length constraints
- Validate priority values
- Improve error handling with proper user feedback
For inventory:
- Add required field validation for SKU and name
- Validate and sanitize SKU, name, description, category, and notes
- Add length constraints for all text fields
- Improve error messages for validation failures
- Add validation for date parsing in filters
These changes improve data quality and prevent potential security
issues from unsanitized user input.
Replace bare except clauses with specific exception types and add
appropriate logging throughout the codebase. This improves:
- Debugging capabilities with proper error messages
- Code maintainability by catching specific exceptions
- Error tracking through structured logging
Changes include:
- Replace bare except: with specific exception types (JSONDecodeError,
TypeError, ValueError, OSError, AttributeError, RuntimeError)
- Add logging for error conditions that were previously silently ignored
- Improve error messages with context information
Add existence checks before adding columns to report_email_schedules table
to prevent DuplicateColumn errors when columns already exist in the database.
This ensures the migration can be safely rerun and handles cases where
columns were manually added or migration partially completed.
Fixes: split_by_salesman and salesman_field_name columns in
report_email_schedules table
- Inventory: Group stock lots by warehouse, unit cost, lot type, and date
to prevent duplicate display entries
- Inventory: Add total value calculation and display per warehouse
- Migration: Make 082_add_global_integrations migration idempotent with
existence checks for columns and indexes
- Migration: Add 101_add_issues_table migration for client-reported issues
tracking with multi-database support (SQLite, PostgreSQL, MySQL)
- Version: Bump to 4.9.5
Display remaining stock lots grouped by warehouse with devaluation breakdown. Shows quantities at different devaluation rates (e.g. 100pcs at 50%, 100pcs at 75%, 400pcs without devaluation).
- Add selectinload(Comment.attachments) to task comments query
- Prevent N+1 queries when displaying comments with attachments
- Improve performance for pages with multiple comments
This optimization reduces database queries from N+1 to a single
query for all attachments, significantly improving page load times.
- Display attachments below comment content with file type icons
- Add file upload form with toggle functionality
- Show download links and delete buttons (permission-based)
- Add JavaScript toggleAttachmentForm function
- Support PDF, image, document, and generic file type icons
- Display file size and metadata
Completes the comment attachments feature with full UI integration.
- Add upload_comment_attachment route with file validation
- Add download_attachment route for file downloads
- Add delete_attachment route with permission checks
- Enhance Comment.to_dict() to include attachments array
- Support file size limits (10 MB) and type validation
- Proper error handling and file cleanup on errors
Routes follow existing attachment patterns from projects/clients.
- Create CommentAttachment model following ProjectAttachment pattern
- Add database migration for comment_attachments table
- Register CommentAttachment in models __init__.py
- Support file uploads (images, PDFs, documents, archives)
- Include file metadata (size, type, uploader, timestamp)
- Cascade delete attachments when comments are deleted
Enables file attachments to comments for better team collaboration.
- Add offline-indicator.html component with sync queue panel
- Integrate offline indicator into base template
- Enhance offline-sync.js updateUI method for better integration
- Add visual feedback with status icons and colors
- Display pending sync items count and status
- Improve user experience for offline functionality
The offline indicator provides real-time feedback about sync status
and allows users to view pending sync operations.
Remove redundant 'import traceback' statement inside exception handler
in docker/start-fixed.py. The traceback module is already imported at
the top of the file, and the local import was causing Python to treat
it as a local variable, leading to UnboundLocalError when the exception
handler didn't execute.
Add existence checks to older migrations (002, 004, 013, 021, 031, 034, 044,
046, 071, 086, 087) to prevent errors when objects already exist.
Also fixes syntax errors in migrations 046 and 086 where index creation
code was incorrectly placed outside try/except blocks.
All affected migrations now:
- Check for table/column/index existence before creating
- Handle existing objects gracefully with informative messages
- Have safe downgrade functions
- Use proper try/except error handling
Add existence checks to recent migrations (032, 049, 053, 055, 058, 064, 099)
to prevent DuplicateTable and DuplicateColumn errors. These migrations now:
- Check if tables/columns exist before creating them
- Handle cases where objects already exist gracefully
- Provide informative messages about operations
- Have safe downgrade functions with existence checks
This makes migrations more resilient to partial failures and manual
schema changes.
Fix migration 098 to check if invoice_peppol_transmissions table exists
before creating it. This prevents DuplicateTable errors when the migration
is run on databases where the table was already created manually or
during a previous partial migration attempt.
The migration now:
- Checks for table existence before creating
- Handles existing tables gracefully
- Provides informative messages
- Has safe downgrade function
- Update translation files for Arabic, German, English, Spanish
- Update Finnish, French, Hebrew, Italian translations
- Update Norwegian (nb/no) and Dutch translations
- Sync translations across all language files
- 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'.