Skip to content

Commit

Permalink
feat: expose bank account into legal templates
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Dec 3, 2024
1 parent 5574110 commit b51cdae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions weblate_web/legal/management/commands/generate_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from django.template.loader import render_to_string
from ruamel.yaml import YAML

from weblate_web.invoices.models import BANK_ACCOUNTS
from weblate_web.pdf import render_pdf


Expand Down Expand Up @@ -56,6 +57,9 @@ def handle(self, document: Path, params: Path, output: Path, **kwargs):

context: dict[str, str] = {
"title": configuration["title"],
"bank_accounts": {

Check failure on line 60 in weblate_web/legal/management/commands/generate_document.py

View workflow job for this annotation

GitHub Actions / mypy

Dict entry 1 has incompatible type "str": "dict[str, BankAccountInfo]"; expected "str": "str"
currency.label: bank for currency, bank in BANK_ACCOUNTS.items()
},
}

for name, value in yaml.load(params).items():
Expand Down

0 comments on commit b51cdae

Please sign in to comment.