- Add settings.disabled_module_ids (JSON) to store admin-disabled module IDs
- Migration 110: add disabled_module_ids column to settings
- ModuleRegistry.is_enabled() respects settings.disabled_module_ids
- Admin > System Settings: new 'Module visibility' section with toggles
for all non-core modules; disabled modules are hidden from all users.
- Core modules stay always on; default empty list keeps current behavior.
Audit logs were not recording any changes because after_flush runs
after SQL is emitted; by then session.new, session.dirty, and
session.deleted can be cleared and attribute history for updates is
often consumed, so the handler saw nothing to log.
Changes:
- Add receive_before_flush: process session.dirty (updates) and
session.deleted (deletes) while history is still valid; stash
session.new (creates) in session.info for after_flush.
- Simplify receive_after_flush: only handle pending creates from
session.info (instances now have ids), then session.flush() so
audit rows are in the same transaction.
- Register receive_before_flush for before_flush on Session,
sessionmaker class, and SignallingSession.
- Make receive_before_flush accept (session, flush_context, instances)
to match SQLAlchemy's before_flush signature.
- Remove db.session.flush() from AuditLog.log_change to avoid
nested flush; rely on main flush or explicit flush in after_flush.
- check_audit_logging.py: use entity_type='TimeEntry' to match
get_entity_type (model __class__.__name__).
- test_audit_logging: assert at least one AuditLog for create/update/
delete; use test_client for create; fix update to merge then mutate.
- Fix formatting when i18n labels wrap (e.g. 'Finanzen und Ausgaben'):
- text-align: start and min-w-0 on labels for proper wrapped alignment
- flex-shrink: 0 on icons/chevron to keep them vertically centered
- Add sidebar-nav-item class and CSS for all main nav items
- Add direct Report Builder and Scheduled Reports links to Finance & Expenses dropdown
- Add app/static/css/gantt-chart.css to override Frappe Gantt:
- Card-style container, grid, and popup using app palette
- Primary (#4A90E2) for projects and today column; tasks #10b981
- Dark mode via .dark for grid, text, bars, arrows, and tooltip
- Themed today highlight, bar labels, and dependency arrows
- In gantt/view.html: link gantt-chart.css, drop inline overrides
- Gantt options: bar_height 24, bar_corner_radius 6, padding 20
- Add Project.color (hex) and migration for projects.color
- Projects create/edit: Gantt color field with Pickr (swatch + hex input),
Pickr theme CSS and gantt-color-picker.js for init and sync
- Gantt API: include color in JSON for projects and tasks (tasks use project color)
- Gantt view: set custom_class from color, inject CSS for .bar and .bar-progress,
fix selectors for .gantt .bar-wrapper and :hover/.active overrides; add
fallback styles for gantt-project and gantt-task
InventoryReportService: use moved_at and reference_type/reference_id instead of non-existent movement_date and reference to avoid AttributeError in get_inventory_turnover, _get_stock_at_date, get_movement_history.
_ensure_legacy_lot: run only for outflows (movement_qty < 0) or record_devaluation (movement_qty None). For outflows use pre-movement total (updated_stock + abs(qty)) so FIFO consumption stays in sync with WarehouseStock. Skip for inbound to prevent double-count of new lots.
record_movement: stop swallowing exceptions from _apply_lot_changes; re-raise so callers can roll back and avoid inconsistent WarehouseStock vs StockLot state.
Movement form: dynamic quantity hint by type (return/waste/devaluation/default), required devaluation fields when shown, client-side sign checks for return (positive) and waste (negative).
Tests: test_first_inbound_with_no_lots_matches_warehouse_stock, test_first_outbound_with_no_lots_matches_warehouse_stock.
When changing Admin settings or toggling telemetry, users could be
redirected to the Welcome screen (/setup) because installation.json
was sometimes overwritten without setup_complete, and
get_telemetry_preference() could poison the in-memory config with a
bad load.
- _save_config(): merge with on-disk state before write so existing
keys (e.g. setup_complete) are never dropped.
- get_telemetry_preference(): use a local load only; do not overwrite
self._config to avoid poisoning the shared state when the file is
corrupt or empty.
Add tests to ensure set_telemetry_preference does not remove
setup_complete and that a bad get_telemetry_preference load does not
lead to setup_complete being wiped on the next set_telemetry_preference.
Pagination used url_for(..., **filters) which included:
- client_custom_field (a dict): URL encoding cannot handle dict values
- page: overwrote the explicit page param in Prev/Next links
Introduce url_filters: exclude client_custom_field and page, expand
client_custom_field into custom_field_<key> query params. Use url_filters
in _time_entries_list.html for all pagination url_for calls.
- Add custom error handlers (403, 404, 500) with user-friendly error pages
- Create new error.html template with consistent styling and navigation
- Enhance context processor to inject pending approvals and notifications counts
- Add error handling to client approval service with proper rollback
- Update all client portal templates with improved UI/UX
- Improve base template with better navigation and data injection
- Add graceful error handling to prevent cascading failures
This update significantly improves the user experience in the client portal
by providing clear error messages and better visual feedback throughout
all pages.
- Fix horizontal overflow in action bar on smaller screens with responsive wrapping
- Fix canvas header overflow by adding flex-wrap and responsive stacking
- Fix canvas toolbar overflow with proper wrapping and button sizing
- Hide page size help text on mobile to prevent overflow
- Replace purple gradient sidebar with clean white card design
- Update colors to use app's primary blue (#3B82F6) and neutral grays
- Redesign element items with proper card styling and hover effects
- Update search box and tabs to match app's input/button components
- Add comprehensive dark mode support throughout toolbox
- Improve visual consistency between invoice and quote PDF editors
All fixes applied to both invoice and quote PDF editors for consistent
responsive behavior across all screen sizes.
The trackable item validation was running too early, blocking all return/waste movements even when devaluation wasn't enabled. Move the check to only run when devaluation is actually being used.
- Move trackable validation to devaluation-specific code paths
- Allow non-trackable items for return/waste without devaluation
- Update form to show all active items (trackability only required for devaluation)
Fixes#385
- Inline asset preparation logic in PowerShell script
- Add better error handling and diagnostics for missing assets
- Improve icon file detection and generation guidance
- Add ASSETS_PREPARED environment variable to prevent duplicate work
- Fix path handling and output messages
- Bump desktop package version to 4.10.6
- Remove .assets_prepared build artifact from version control
- Add iOS archive creation step to build-mobile.yml
- Enhance error handling and diagnostics in cd-release.yml
- Add file existence checks and directory listings for debugging
- Change artifact upload from 'ignore' to 'error' for better failure detection
- Add date_format column to invoice_pdf_templates and quote_pdf_templates tables
- Default date format set to DD.MM.YYYY (%d.%m.%Y)
- Update PDF generators to use template-specific date format
- Add date format configuration in admin PDF template editor
- Replace Babel date formatting with strftime for consistent formatting
- Update template filters to use DD.MM.YYYY format by default
This allows users to customize date formatting per PDF template while
maintaining backward compatibility with existing templates.
Fixes issue #432 where decorative images would disappear after saving
the layout and PDF preview would show mostly black.
Root causes:
- Konva's toJSON() doesn't serialize custom attributes like imageUrl
- Warning system adds 'element-overlap' suffix to names, breaking exact matches
- PDF generation tried to render images with empty/invalid sources
Fixes applied:
1. Serialization fixes (quote_pdf_layout.html, pdf_layout.html):
- Manually inject imageUrl into JSON after Konva serialization
- Store imageUrl in a map before serialization and match by position/index
- Ensure primary name is 'decorative-image' before serialization
- Fix name matching to handle 'decorative-image element-overlap' names
2. Restoration fixes (quote_pdf_layout.html, pdf_layout.html):
- Search for decorative images using .includes() instead of exact match
- Match by position when searching saved JSON for imageUrl
- Create placeholder elements when imageUrl is missing
- Ensure decorative image groups remain visible even without imageUrl
3. PDF generation fixes (pdf_generator_reportlab.py):
- Skip decorative images with empty/invalid sources gracefully
- Log warnings instead of attempting to render invalid images
- Prevents black screen in PDF preview
4. Enhanced logging:
- Added [INVOICE] and [SAVE]/[LOAD] prefixes for better debugging
- Verify imageUrl presence in JSON before saving and after loading
The fixes ensure decorative images are properly saved with their imageUrl
attribute, correctly restored on load, and don't break PDF generation when
the image source is missing or invalid.
- Add comprehensive logging with [INVOICE] prefixes for better traceability
- Fix decorative image detection to handle modified names (e.g., 'decorative-image element-overlap')
- Implement position-based matching for imageUrl restoration from saved JSON
- Improve robustness when searching for decorative-image groups in Konva layer
- Add fallback mechanisms for finding imageUrl when position matching fails
- Enhance error messages and warnings with detailed context
- Ensure primary name 'decorative-image' is preserved before serialization
- Add verification logging to track imageUrl assignment and retrieval
These changes address issues where decorative images could lose their imageUrl
when saved/loaded, especially when elements have additional names or classes
applied (like 'element-overlap'). The position-based matching ensures correct
imageUrl restoration even when multiple decorative images exist.
- Create migration 090 to add push_subscriptions table
- Fixes database error when deleting users (relation 'push_subscriptions' does not exist)
- Table includes foreign key to users with CASCADE delete
- Adds index on user_id column
- Follows idempotent migration pattern for safe execution
Fixes#428
- Remove separator lines from loadDefaultLayout() in both quote and invoice templates
- Improve cleanup logic to detect and remove border lines at origin (0,0) with full page width
- Enhance filtering in code generation to catch border lines before export
- Add comprehensive line detection that calculates actual position from points array
- Filter out lines with colors #667eea, #dee2e6, and other gray/blue separator colors
- Ensure cleanup runs on template load to remove any saved unwanted elements
This fixes the persistent issue where unwanted border lines would reappear
even after deletion, especially at position (0,0) with full page width.
The lines are now filtered at multiple stages: during load, before save,
and during code generation to ensure they never appear in exported templates.
Fixes issue with unwanted border lines in PDF previews and generated PDFs.
Remove padding from wrapper elements that was causing an unwanted
border-like gap around PDF content in both preview and export.
Changes:
- Remove 20px padding from .quote-wrapper and .invoice-wrapper in
generated CSS (quote_pdf_layout.html and pdf_layout.html)
- Remove 20px padding from preview HTML templates in admin.py for both
invoice and quote previews
- Set padding to 0 !important to ensure content aligns with page edges
This ensures the preview and export match the exact page boundaries
shown by the blue border in the editor, eliminating the mysterious
border issue reported in #425.
- Add decorative image element to PDF Layout Designer for both invoice and quote templates
- Implement template-level decorative image upload and management
- Add backend routes for template image upload and serving
- Update PDF generation (HTML preview and ReportLab) to handle template images with transparency preservation
- Sync all decorative image functionality between invoice and quote PDF layout editors
Fixes:
- Fix upload button not opening file picker in invoice template (use fresh DOM references)
- Fix element name matching to handle 'decorative-image element-overlap' format (use .includes() instead of strict equality)
- Fix image restoration after page reload with enhanced JSON searching and position matching
- Fix image persistence in Konva.js serialization/deserialization
Improvements:
- Enhanced image restoration logic with fallback mechanisms
- Improved error handling and console logging for debugging
- Better handling of transparent backgrounds in PDF export
- Consistent behavior between invoice and quote template editors
- Comment out mobile app tests as source code is incomplete
- Tests exist but lib/ source code is missing
- Allows CI/CD to continue building while mobile app is in development
- Add real-time timer status display in system tray tooltip
- Show elapsed time for active timers in tray
- Improve system tray menu with timer status updates
- Add IPC communication for timer status updates
- Enhance API client with better error handling
- Update desktop app styling and UI improvements
- Update README with detailed API token setup instructions
- Add 'devaluation' to stock movement types
- Add validation to ensure trackable items for devaluation
- Improve error handling for devaluation operations
- Add comprehensive visual designer interface for PDF templates
- Support drag-and-drop element placement and styling
- Add support for additional element types (shapes, images, tables)
- Improve template preview and editing capabilities
- Add JSON import/export functionality for templates
- Enhance quote PDF layout editor with full design capabilities
- Refactor admin routes to support new template editing features
- Disable rotation handles in transformer (rotateEnabled: false)
- Remove warning indicator dots from canvas (warnings shown in panel only)
- Add text color to warning items for better visibility
- Clean up warning indicators when loading templates
- Apply improvements to both invoice and quote PDF designers
- Add validation to ensure page width/height match selected page size
- Apply fix to both invoice and quote PDF templates
- Fixes layout issues when templates are customized with mismatched dimensions
- Add logging for dimension updates
- Add automatic permission and role synchronization on role list view
- Improve system role editing: allow editing but prevent name changes
- Enhance permissions seed utility for better role management
- Fix role editing validation to be more user-friendly
- Enhance build scripts with better error handling and Windows support
- Add Windows-specific build scripts and PowerShell utilities
- Add asset preparation and verification scripts
- Update GitHub Actions workflows for desktop and mobile builds
- Add build configuration and troubleshooting utilities
- Improve cross-platform build compatibility
- Integrate new logo assets across all templates
- Update base template with improved favicon and meta tags
- Add logo support to login, admin, and inventory templates
- Update web manifest with new branding
- Enhance PDF layouts with logo support
- Add page dimension validation in PDF generators to prevent content
from being drawn outside page boundaries
- Fix page number positioning in fallback PDF generator to ensure
they stay within page margins
- Add boundary constraints for absolutely positioned elements in
ReportLab template renderer
- Prevent rendering errors when elements exceed page dimensions