Skip to content

Commit

Permalink
[FIX] fix to provide the allowed journal when journal.code is dutch
Browse files Browse the repository at this point in the history
  • Loading branch information
andreschenkels committed Jan 23, 2024
1 parent 00fcfa7 commit 791159b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions l10n_nl_rgs/models/account_chart_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ def get_allowed_account_journals_based_on_type(self, all_journals, type_list):
return all_journals.filtered(lambda j: j.type in type_list)

def get_allowed_account_journals_based_on_code(self, all_journals, code_list):
# Not so nice fix, needs more testing and different approach
nl_mapping = {"MISC": "MEM", "WAG": "SAL", "DEPR": "AFSC"}
for k, v in nl_mapping.items():
if k in code_list and v not in code_list:
code_list.append(v)
return all_journals.filtered(lambda j: j.code in code_list)

def _create_bank_journals(self, company, acc_template_ref):
Expand Down

0 comments on commit 791159b

Please sign in to comment.