-
Notifications
You must be signed in to change notification settings - Fork 291
v0.8.0 #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implemented dynamic page titles and subtitles for account pages by overriding `get_context_data`. Updated template text and classes for greater consistency, including standardizing icon colors for active, locked, and default roles.
… `{% currency_symbol %}` tag to render the correct symbol when `DJANGO_LEDGER_CURRENCY_SYMBOL` is other than default ("$"). (#265)
Clarified the types of pull requests that are encouraged, emphasizing those that address bug fixes, enhancements, or valuable additions. Added a note discouraging submissions focused only on cosmetic changes like linting or refactoring.
Adjusted `ManyToManyField` relationships in `BillModel`, `InvoiceModel`, and `PurchaseOrderModel` to include `through` and `through_fields` for `ItemTransactionModel`. Incremented package version to `0.7.8`.
…FX standards - Introduced `bank_account_type` field in `BankAccountModel` with predefined choices. - Added methods to retrieve routing number, account type, and account type validation in `OFXImport` class. - Enhanced account queries with a new `.cash()` method to filter accounts with `ASSET_CA_CASH` role. - Updated indexing and unique constraints for `BankAccountModel`.
- Replaced `BankAccountModel.BANK_ACCOUNT_TYPES` with explicit OFX types. - Renamed `ACCOUNT_TYPE_ROLE_MAPPING` to `ACCOUNT_TYPE_DEFAULT_ROLE_MAPPING`. - Centralized OFX type mappings in `ACCOUNT_TYPE_OFX_MAPPING`. - Removed `bank_account_type` field from `BankAccountModel`. - Added `get_account_type_from_ofx` method for retrieving account type from OFX data.
- Introduced `financial_institution` field in account mixin for storing bank details. - Added `get_account_last_digits` utility for partial account number retrieval. - Implemented `can_hide` and `can_unhide` methods in `BankAccountModel`.
- Renamed `get_account_type` to `get_ofx_account_type` for clarity in OFX implementation. - Added `get_account_type` method to map OFX account types to internal account types. - Introduced `get_routing_last_digits` method for masked routing number retrieval. - Improved handling of missing account and routing numbers in utility methods.
# Conflicts: # django_ledger/__init__.py # pyproject.toml
Sort node issue fix
…yModel` instances.
* Add customer and vendor code fields, picture upload functionality, and UI improvements - Introduced `customer_code` and `vendor_code` fields for user-defined unique codes in `CustomerModel` and `VendorModel`. - Added support for customer and vendor picture uploads with specified upload paths. - Updated migration `0023` to reflect the new fields and modifications. - Improved UI consistency in templates and added icons for enhanced usability. - Updated `pyproject.toml` to bump version to `0.7.10`. * Bump version to 0.7.10.
* - Refactored `for_entity` method across multiple models to support `EntityModel`, string slugs, or UUIDs.
- Deprecated `user_model` parameter in favor of a streamlined approach.
- Updated views and querysets to use `entity_model` for entity identification.
- Improved queryset filtering and added helper methods for specific use cases (e.g., `active`, `hidden`).
- Introduced warnings for deprecated functionality.
- Reorganized and cleaned up imports for consistency.
- Bumped version to `0.8.0` to reflect breaking changes.
**Summary**: Enhanced entity-based filtering, streamlined functionality by deprecating `user_model`, improved code clarity, and added warnings for legacy behavior. Updated versioning to mark breaking API changes.
* - Updated `asgiref` to version `3.9.1` with adjusted Python compatibility (>= 3.9).
- Upgraded `django` to version `5.2.6` with updated Python compatibility (>= 3.10).
- Upgraded `django-debug-toolbar` to version `6.0.0` with adjusted dependency compatibility.
- Removed the `overrides` dependency (version `7.7.0`), cleaning up unused packages.
**Summary**: Dependency updates to align with Python version changes and improved compatibility while removing unused packages.
* - Updated `BillModel` and `InvoiceModel` to use `RESTRICT` on delete for `ForeignKey` fields: `cash_account`, `prepaid_account`, and `unearned_account`.
- Modified `related_name` properties for these fields to ensure unique reverse lookups.
- Allowed these `ForeignKey` fields to accept blank and null values.
**Summary**: Refined `ForeignKey` relationships in `BillModel` and `InvoiceModel` for improved referential integrity and flexibility in handling nullable fields. Added custom `related_name` for clarity and consistency.
* - Updated dependency version requirements in the Documentation `requirements.txt` from exact matches (`==`) to flexible ranges (`>=`) for several packages, including `asgiref`, `django`, `django-treebeard`, `faker`, `markdown`, `tzdata`, and `myst_parser`.
**Summary**: Relaxed dependency constraints in `requirements.txt` to allow compatibility with future versions, improving flexibility for package updates.
* - Replaced `entity_slug` parameter with `entity_model` across views, models, and forms for streamlined entity identification.
- Deprecated `user_model` parameter and introduced warnings for legacy usage.
- Introduced `deprecated_for_entity_behavior` decorator to warn about deprecated behavior and enable optional backward compatibility.
- Updated `address_1` field in models to allow blank and null values, and enforced validation to require `address_1` if `address_2` is provided.
- Improved template conditionals to avoid rendering empty address fields, and standardized icon styles for active and hidden statuses.
- Removed unused variable assignments, refactored import statements, and cleaned up redundant code for better maintainability.
- Created a utility file for deprecation handling.
**Summary**: Enhanced entity-based querying by aligning
* - Added advanced annotations to handle root-group presence and uniqueness checks (`accountmodel_rootgroup__count` and `accountmodel_rootgroup_roles__distinct_count`).
- Introduced `configured` boolean field with dynamic annotation for determining if `ChartOfAccounts` is appropriately configured.
- Refactored `configure` method to support hierarchical boilerplate creation for account insertion, replacing redundant code.
- Implemented `is_configured` method for streamlined ChartOfAccounts configuration validation.
- Ensured auto-configuration of ChartOfAccounts in critical workflows by integrating configuration calls in `post_save` and validation logic.
- Extended support for lazy account hierarchy creation with additional root account and child node addition logic.
**Summary**: Enhanced the `ChartOfAccounts` model with improved configuration checks, hierarchical boilerplate generation, and streamlined auto-configuration workflows. Refactored code for improved maintainability while ensuring backward compatibility.
* - Replaced `entity_slug` usage with `entity_model` across all views, models, and forms for improved consistency in entity handling.
- Deprecated the `user_model` parameter and introduced warnings for its legacy usage.
- Adjusted related methods, querysets, and decorators to align with the refactored behavior (`deprecated_entity_slug_behavior`).
- Simplified queryset filtering by leveraging `entity_model
* - **Updated README**:
- Reformatted text for clarity by restructuring lines for better readability.
- Added section on deprecated behavior settings (`DJANGO_LEDGER_USE_DEPRECATED_BEHAVIOR`) introduced in `v0.8.0`:
- Default set to `False` (deprecated features disabled by default).
- Instructions included to enable temporarily if needed during transition.
**Summary**: Improved README structure for readability and added an explanation of new `DJANGO_LEDGER_USE_DEPRECATED_BEHAVIOR` for managing legacy behaviors starting from `v0.8.0`. Maintains backward compatibility by allowing optional reactivation of deprecated features.
* - Restored migration `0025_alter_billmodel_cash_account_and_more` with updates to `BillModel`, `InvoiceModel`, and related models.
- Updated `ForeignKey` fields (`cash_account`, `prepaid_account`, `unearned_account`) to allow `blank=True` and `null=True`.
- Adjusted `on_delete` behavior to use `RESTRICT` for referential integrity.
- Updated `related_name` fields for uniqueness and clarity.
- Made `address_1` nullable and blank for `CustomerModel`, `EntityModel`, and `VendorModel`.
- Added `uv.lock` file to project for dependency resolution.
- Included Python version constraints (>=3.10).
- Listed multiple package dependencies and versions for project reproducibility.
**Summary**: Reinstated migration to refine `ForeignKey` relationships and fields across multiple models while enabling nullable fields and ensuring referential integrity. Added dependency lock file to manage package versions effectively. No backwards compatibility issues anticipated.
* Removing Pipfile & Pipfile.lock
* - **Integrated pandas compatibility**:
- Added a fallback mechanism for environments without pandas installed.
- Updated outputs to dynamically adapt based on pandas availability.
- **Refinements to QuickStart Notebook**:
- Added execution time metadata to all code cells for detailed tracking.
- Commented out unnecessary directory change (`os.chdir()`).
- Refactored imports with conditional handling for pandas and inline checks to maintain functionality without pandas.
- Enhanced data retrieval and rendering logic to support both DataFrame usage and plain object representation.
- Structured code for better readability and manageable outputs.
**Summary**: Improved the QuickStart Notebook by introducing pandas compatibility checks, refining imports, and reorganizing code execution flows. Users can now run the notebook seamlessly in environments with or without pandas. No backward compatibility issues identified.
* NEW THEME!
- **Added Global Context Processor and Theme Support**:
- Introduced `django_ledger_context` global context processor for injecting settings variables (`DEBUG`, `VERSION`, `DJANGO_LEDGER_THEME`) into templates.
- Updated documentation with usage instructions for adding the context processor to `TEMPLATES` configuration.
- Introduced `DJANGO_LEDGER_THEME` setting with validation for supported themes (`lux`, `minty`) and default set to `lux`.
- Integrated static theme asset (`lux.min.css`) to provide predefined visual styles.
- **Entity Model Updates**:
- Refactored `counted_inventory` method to use `entity_model` instead of `entity_slug`, improving entity handling consistency.
- **Settings Cleanup and Enhancement**:
- Replaced imports in `settings.py` from `django.conf` to `django.conf.global_settings` for better compatibility.
- Cleaned up commented-out model abstract settings block and added the updated block at the end with additional theme-related settings.
**Summary**: Implemented a global context processor for convenient access to core settings in templates and added support for theme selection with validation. Cleaned up settings and standardized `entity_model` usage across views for improved consistency. Maintains backward compatibility.
* Deprecated Experimental GraphQL Support.
No longer maintained & out of scope of project.
* - **Removed `django_ledger_graphene` README**:
- Deleted the `README.md` file associated with `django_ledger/contrib/django_ledger_graphene`.
- Cleaned up obsolete installation and usage instructions for GraphQL support.
* - **Removed `lux.min.css` theme file**:
- Deleted the `lux.min.css` file from `django_ledger/static/django_ledger/themes`, removing the prebuilt Bulmaswatch theme.
**Summary**: Removed unused `lux.min.css` theme file to clean up static assets. This change eliminates a redundant dependency and improves maintainability. No backward compatibility issues were identified as theme handling mechanisms are already in place with support for multiple options.
* Assets update
* - **Improved financial statement templates for better usability and visual consistency**:
- Updated table styles:
- Added classes `is-hoverable`, `is-bordered`, and `financial-statement` for enhanced table styling and hover effects.
- Applied column-specific alignment for right-aligning currency values using styles.
- Enhanced UX with new `<style>` blocks to improve the rendering of financial data across the income statement, balance sheet, and cash flow statement templates.
- Improved visibility of balance types:
- Replaced plain `credit`/`debit` icons with styled tags and smaller icons for a more polished appearance.
- Adjusted headings for better readability:
- Lowered sizes of section headings (e.g., from `is-size-3` to `is-size-4`) for a cleaner look.
- Refined date range display format:
- Updated templates to show more user-friendly text like "For the month ended" or "As of" with full date format (e.g., `F j, Y`).
- **General template enhancements**:
- Added placeholders for translations to improve localization support.
- Ensured consistency in alignment and layout across all financial statement templates.
- Updated card entity templates:
- Added spacing (`mr-3`) to icons for better alignment in entity card headers.
**Summary**: Improved the usability, visual consistency, and localization capabilities of financial statement templates. Introduced styled elements, enhanced table formatting, and refined date displays for better user experience. Changes are fully backward compatible.
* Data Import Form Update
* requirements.txt update
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.