summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-06-24 15:08:37 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-06-24 15:08:37 +0700
commit7e42b0fdd1735df03e249f1362e58c169236465d (patch)
tree75a1c5f906bd7673e31902feccd3ce1a1eb84bef
parenta7139584557cc8c0d881bafc25b4cbbdb1c93ffc (diff)
(andri) fix download xml invoice
-rw-r--r--indoteknik_custom/models/account_move.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index ece47236..af24f93e 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -437,18 +437,18 @@ class AccountMove(models.Model):
return invoices
def export_faktur_to_xml(self):
-
valid_invoices = self
- # Panggil model coretax.faktur untuk menghasilkan XML
coretax_faktur = self.env['coretax.faktur'].create({})
- response = coretax_faktur.export_to_download(invoices=valid_invoices, down_payments=valid_invoices.down_payment)
- current_time = datetime.utcnow()
- # Tandai faktur sebagai sudah diekspor
+ response = coretax_faktur.export_to_download(
+ invoices=valid_invoices,
+ down_payments=[inv.down_payment for inv in valid_invoices],
+ )
+
valid_invoices.write({
'is_efaktur_exported': True,
- 'date_efaktur_exported': current_time, # Set tanggal ekspor
+ 'date_efaktur_exported': datetime.utcnow(),
})
- return response
+ return response \ No newline at end of file