diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-03 11:31:46 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-03 11:31:46 +0700 |
| commit | 2a3adac9333c2bd5cb9f0dca3ba080cd3e6dfce8 (patch) | |
| tree | f521b923be6a3d9a9aeb0d86f566a73cabb4856a | |
| parent | 3553599efb4046ad4788e1d2b48a3081f246c85b (diff) | |
automatic download
| -rw-r--r-- | indoteknik_custom/models/coretax_fatur.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py index 1c3af6a4..a0820fee 100644 --- a/indoteknik_custom/models/coretax_fatur.py +++ b/indoteknik_custom/models/coretax_fatur.py @@ -85,9 +85,10 @@ class CoretaxFaktur(models.Model): }) # Kembalikan URL untuk download dengan header 'Content-Disposition' - return { + response = { 'type': 'ir.actions.act_url', - 'url': '/web/content/{}'.format(attachment.id), + 'url': '/web/content/{}?download=true'.format(attachment.id), 'target': 'self', - 'params': {'download': True}, # Menambahkan parameter untuk memastikan file didownload } + + return response |
