Skip to content
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

Update README.md #230

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Update README.md #230

merged 1 commit into from
Jan 24, 2025

Conversation

dibasdauliya
Copy link
Contributor

the update will fix zsh: no matches found: django-ledger[graphql,pdf] error

fix: `zsh: no matches found: django-ledger[graphql,pdf]` error
@elarroba elarroba self-assigned this Jan 24, 2025
@elarroba elarroba changed the base branch from master to v0.7.4 January 24, 2025 13:58
@elarroba elarroba added bug Something isn't working enhancement New feature or request labels Jan 24, 2025
@elarroba elarroba merged commit cb39ec7 into arrobalytics:v0.7.4 Jan 24, 2025
@elarroba
Copy link
Member

@dibasdauliya Thank you for your contribution.

elarroba added a commit that referenced this pull request Feb 1, 2025
* Refactor journal entry logic and update dependencies.

Removed redundant queryset logic in views and improved queryset annotations in models. Added validation for root account addition in Chart of Accounts. Updated project dependencies to the latest compatible versions.

* JournalEntry activity set to none after unlock.
README.md update
Template Updates

* Optimization and refactoring of the TransactionModel and JournalEntryModel Manager and QuerySets.
Documentation Update

* JournalEntryModel clean up and optimization.
TransactionModel clean() validation migrates to pre_save signal.

* Refactor transaction queryset methods to support annotation.

Updated `get_transaction_queryset` in Bill and Invoice models to optionally include annotated details. Simplified queryset construction to improve readability and maintainability. These changes enhance flexibility and prepare for future annotation use cases.

* Refactor transaction table rendering logic.

Replaced redundant template tags for transaction tables with a consolidated `transactions_table` tag. Updated related templates to use the new tag and streamlined logic to handle different object types more efficiently. This enhances maintainability and reduces code duplication.

* Refactor template variables and add new transaction table.

Updated variable names in existing templates for consistency and clarity, replacing nested attributes with single-level ones. Added a new reusable transaction table template to support both detailed and compact display styles. These changes improve maintainability and code readability.

* Remove redundant get_queryset methods in journal views

Removed duplicate `get_queryset` methods from multiple journal entry views to simplify the codebase and reduce unnecessary database queries. Optimized logic by relying on inherited behavior and reusing existing utilities where applicable.

* Update README.md (#230)

fix: `zsh: no matches found: django-ledger[graphql,pdf]` error

* Refactor journal entry views to use common base class

Replaced `JournalEntryModelModelViewQuerySetMixIn` with `JournalEntryModelModelBaseView` to streamline and standardize view inheritance. This improves code clarity and reduces duplication across journal entry views. Also reformatted imports for better readability.

* Refactor account action and detail views for consistency

Replaced `AccountModelModelActionView` with `BaseAccountModelActionView` for account actions and corrected mixin order in detail views. These changes aim to ensure consistency in class naming and inheritance hierarchy, improving code readability and maintainability.

* Refactor and enhance JournalEntryModel functionality.

Improved validation, locking, and query handling for JournalEntryModel with stricter consistency checks and enhanced property methods. Updated docstrings to provide clear, detailed explanations for developers and added utility methods for ledger and transaction validation.

* Refactor context handling in JournalEntry views

Removed redundant arguments and centralized context generation. Simplified formset initialization by leveraging `get_authorized_entity_instance` for entity model retrieval. This improves code clarity and maintainability.

* Remove unused 'can_edit_journal_entries' method.

The 'can_edit_journal_entries' method was redundant and not in use, so it has been removed to clean up the code. This improves maintainability by eliminating dead code.

* Refactor TransactionModelFormSet to simplify initialization

Revised `TransactionModelFormSet` to streamline initialization parameters by replacing `entity_slug` and `ledger_pk` with `EntityModel`. Utilized `EntityModel.get_coa_accounts()` for fetching accounts and added validation with `JournalEntryModel.validate_for_entity()`. This improves code readability and enhances maintainability.

* Refactor and enhance EntityUnit model functionality

Updated docstrings for clarity, introduced annotations in the manager for entity attributes, and improved the `__str__` method. Added `entity_slug` and `entity_name` as properties to streamline access to related entity data.

* Refactor JournalEntryForm initialization and validation logic

Remove unnecessary user_model dependency and streamline queryset logic for entity_unit field. Update ledger validation to check for locking status, improving clarity and maintainability of the code.

* Migration

* Refactor JournalEntry update form handling logic

Replaced `JournalEntryModelUpdateForm` base class to simplify form structure. Updated `get_form` method to `get_form_class` in the view for cleaner and more maintainable form handling. Improved separation of concerns and reduced redundant code.

* Fixes typo on Current Maturities of Long Term Debt (#241)

Replaced `Tern` with `Term`

* Refine amount validation and error messages.

Change validation to reject only negative amounts, allowing zero. Clarify error messages for invalid amounts, improving readability and accuracy.

* Rename variable in ledgers_table inclusion tag.

Updated the context dictionary key from 'ledgers' to 'ledger_model_qs' for clarity and better alignment with the actual parameter name. This ensures consistent naming and improves code readability.

* Add URL generators for journal entry actions

This update introduces methods to generate URLs for creating, posting, unposting, locking, and unlocking journal entries. These additions enhance the model's capabilities by centralizing URL construction for commonly used actions, improving code clarity and maintainability.

* Refactor journal entry template variable names

Updated the variable names in the journal entry table template for clarity and consistency. Replaced `je` with `journal_entry_model` and adjusted related URLs, conditionals, and references accordingly. This improves readability and aligns the template with model naming conventions.

* Refactor ledger model retrieval and enhance view context data

Moved `get_ledger_model` to the base view for reuse and removed redundant code in other views. Added `order_by` for journal entry queryset and updated context data to include `ledger_model`, subtitle enhancements, and warning messages for locked ledgers.

* Add utility methods for journal entry and ledger actions

Introduce methods to generate URLs for creating journal entries, posting journal entries, and locking journal entries. These additions enhance the model's functionality by providing predefined action URLs for better integration and usability.

* Refactor ledger views to use a unified base mixin.

Replaced `LedgerModelModelViewQuerySetMixIn` and `DjangoLedgerSecurityMixIn` with the new `LedgerModelModelBaseView` to simplify and streamline view inheritance. This improves code maintainability by consolidating common behavior in a single base class.

* Refactor variable name in ledgers_table template

Replaced 'ledger' with 'ledger_model' throughout the template for improved clarity and consistency with naming conventions. Updated all relevant references, including URLs, loops, and conditionals, to reflect the new variable name.

* Refactor journal entry template for improved readability.

Replaced verbose template URL and variable references with simplified model methods to enhance code clarity and consistency. Added a condition to hide the create button when the ledger is locked, ensuring correct behavior based on the ledger state. All changes are backward compatible and improve maintainability.

* Fix variable name in context dictionary key

Renamed 'jes' to 'journal_entry_qs' for better readability and consistency with the variable name. This ensures clearer context and avoids potential confusion in the template rendering.

* Update context handling and redirect logic in journal views

Replace redundant call to `get_ledger_model` with direct assignment for efficiency. Add support for `next` parameter in redirect logic to enhance navigation flexibility.

* Refactor journal entry action URLs for improved clarity.

Replaced complex template URL patterns with model methods for generating action URLs. This change improves code readability, maintainability, and reduces duplication. Additionally, it ensures the next URL is correctly appended to each action.

* Update form action and back button URL handling

Replaced hardcoded form action URL and back button URL with simplified logic and dynamic URL retrieval. This improves code readability and maintainability.

* Simplify form actions and use model methods for URLs.

Replaced hardcoded URL tags with model method calls for 'Back' links in delete and update templates. Additionally, removed redundant explicit form action attributes to streamline the HTML structure.

* Refactor journal entry queryset initialization logic

Streamlined the queryset initialization by delegating ledger model retrieval to a dedicated method. Simplifies the code and improves readability while maintaining the same functionality.

---------

Co-authored-by: Dibas Dauliya <[email protected]>
Co-authored-by: Ignacio Ocampo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants