django-ledger 0.6.3__py3-none-any.whl → 0.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of django-ledger might be problematic. Click here for more details.

Files changed (48) hide show
  1. django_ledger/__init__.py +1 -1
  2. django_ledger/admin/coa.py +1 -2
  3. django_ledger/forms/account.py +22 -11
  4. django_ledger/io/roles.py +6 -0
  5. django_ledger/models/accounts.py +523 -196
  6. django_ledger/models/entity.py +12 -5
  7. django_ledger/report/cash_flow_statement.py +1 -1
  8. django_ledger/static/.DS_Store +0 -0
  9. django_ledger/static/django_ledger/.DS_Store +0 -0
  10. django_ledger/static/django_ledger/logo_2/.DS_Store +0 -0
  11. django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark.png +0 -0
  12. django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@0.5x.png +0 -0
  13. django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@2x.png +0 -0
  14. django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@3x.png +0 -0
  15. django_ledger/static/django_ledger/logo_2/djl-full-vert.png +0 -0
  16. django_ledger/static/django_ledger/logo_2/djl-full-vert@0.5x.png +0 -0
  17. django_ledger/static/django_ledger/logo_2/djl-full-vert@2x.png +0 -0
  18. django_ledger/static/django_ledger/logo_2/djl-full-vert@3x.png +0 -0
  19. django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz.png +0 -0
  20. django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@0.5x.png +0 -0
  21. django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@2x.png +0 -0
  22. django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@3x.png +0 -0
  23. django_ledger/static/django_ledger/logo_2/djl-logo-full-vert.png +0 -0
  24. django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@0.5x.png +0 -0
  25. django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@2x.png +0 -0
  26. django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@3x.png +0 -0
  27. django_ledger/static/django_ledger/logo_2/djl-logo.png +0 -0
  28. django_ledger/static/django_ledger/logo_2/djl-logo@0.5x.png +0 -0
  29. django_ledger/static/django_ledger/logo_2/djl-logo@2x.png +0 -0
  30. django_ledger/static/django_ledger/logo_2/djl-logo@3x.png +0 -0
  31. django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz.png +0 -0
  32. django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@0.5x.png +0 -0
  33. django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@2x.png +0 -0
  34. django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@3x.png +0 -0
  35. django_ledger/static/django_ledger/logo_2/djl-txt-full-vert.png +0 -0
  36. django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@0.5x.png +0 -0
  37. django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@2x.png +0 -0
  38. django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@3x.png +0 -0
  39. django_ledger/static/django_ledger/logo_2/djl-txt-horiz.png +0 -0
  40. django_ledger/static/django_ledger/logo_2/djl-txt-horiz@0.5x.png +0 -0
  41. django_ledger/static/django_ledger/logo_2/djl-txt-horiz@2x.png +0 -0
  42. django_ledger/static/django_ledger/logo_2/djl-txt-horiz@3x.png +0 -0
  43. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/METADATA +1 -1
  44. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/RECORD +48 -13
  45. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/top_level.txt +0 -1
  46. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/AUTHORS.md +0 -0
  47. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/LICENSE +0 -0
  48. {django_ledger-0.6.3.dist-info → django_ledger-0.6.4.dist-info}/WHEEL +0 -0
django_ledger/__init__.py CHANGED
@@ -9,7 +9,7 @@ Contributions to this module:
9
9
  default_app_config = 'django_ledger.apps.DjangoLedgerConfig'
10
10
 
11
11
  """Django Ledger"""
12
- __version__ = '0.6.3'
12
+ __version__ = '0.6.4'
13
13
  __license__ = 'GPLv3 License'
14
14
 
15
15
  __author__ = 'Miguel Sanda'
@@ -108,7 +108,6 @@ class ChartOfAccountsModelAdmin(ModelAdmin):
108
108
  list_display_links = ['name']
109
109
  fields = [
110
110
  'name',
111
- 'locked',
112
111
  'description',
113
112
  ]
114
113
  inlines = [
@@ -132,4 +131,4 @@ class ChartOfAccountsModelAdmin(ModelAdmin):
132
131
  def account_model_count(self, obj):
133
132
  return obj.accountmodel__count
134
133
 
135
- account_model_count.short_description = 'Accounts'
134
+ account_model_count.short_description = 'Accounts'
@@ -19,16 +19,20 @@ Update Form
19
19
 
20
20
  class AccountModelCreateForm(ModelForm):
21
21
  """
22
- Create Form:
23
- This Form is used for creation of a new account that does not exist in the default Chart of Accounts. It has some external as well as some internal field.
24
- The entity slug and the user model are the field which are internal and are predetermined in the lass itself
22
+ AccountModelCreateForm
23
+ ======================
25
24
 
26
- Remaining fields which needs to be defined by user are :
25
+ A form for creating and managing account models within the system.
26
+
27
+ Attributes
28
+ ----------
29
+ ENTITY : Model
30
+ The entity model being used in the form.
31
+ COA_MODEL : Model
32
+ The Chart of Account Model being used in the form.
33
+ USER_MODEL : Model
34
+ The user model being used in the form.
27
35
 
28
- code: The code will be used to uniquely identify the particular account
29
- name: The name of the account. The name of the account should be resemblance of the nature of the transactions that will be in the account
30
- role: The role needs to be selected rom list of the options available. Choices are given under ACCOUNT ROLES. Refer the account model documentation for more info
31
- balance_type: Need to be selected from drop down as "Debit" or Credit"
32
36
  """
33
37
 
34
38
  def __init__(self, entity_model, coa_model, user_model, *args, **kwargs):
@@ -84,9 +88,16 @@ class AccountModelCreateForm(ModelForm):
84
88
 
85
89
  class AccountModelUpdateForm(MoveNodeForm):
86
90
  """
87
- Update Account Form:
88
- This form is for updating the account. This works for both the parent or the child Account .
89
- We can update the Parent , or The Code or even the Name of the Account.
91
+ AccountModelUpdateForm
92
+
93
+ A form for updating account model, inheriting from MoveNodeForm.
94
+
95
+ Attributes
96
+ ----------
97
+ _position : ChoiceField
98
+ A choice field for selecting the position.
99
+ _ref_node_id : ChoiceField
100
+ An optional choice field for selecting the relative node.
90
101
  """
91
102
 
92
103
  _position = ChoiceField(required=True,
django_ledger/io/roles.py CHANGED
@@ -660,3 +660,9 @@ def validate_roles(roles: Union[str, List[str]], raise_exception: bool = True) -
660
660
  if raise_exception:
661
661
  raise InvalidRoleError('{rls}) is invalid. Choices are {ch}'.format(ch=', '.join(VALID_ROLES), rls=r))
662
662
  return set(roles)
663
+
664
+ VALID_PARENTS = {
665
+ ASSET_PPE_BUILDINGS_ACCUM_DEPRECIATION: [ASSET_PPE_BUILDINGS],
666
+ ASSET_PPE_EQUIPMENT_ACCUM_DEPRECIATION: [ASSET_PPE_EQUIPMENT],
667
+ ASSET_PPE_PLANT_ACCUM_DEPRECIATION: [ASSET_PPE_PLANT],
668
+ }