diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-09-17 18:05:45 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-09-17 18:05:45 +0700 |
| commit | ade0fe34d2d77fa9ee8e275cb60301b325710bd1 (patch) | |
| tree | eeeb88d8c7593a410244cfea20c379e39f2713aa /fixco_custom/models/account_move.py | |
| parent | 776d2eefc8d43462eee3992992088e066fecfe21 (diff) | |
coretax
Diffstat (limited to 'fixco_custom/models/account_move.py')
| -rw-r--r-- | fixco_custom/models/account_move.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fixco_custom/models/account_move.py b/fixco_custom/models/account_move.py index 836b878..bb84573 100644 --- a/fixco_custom/models/account_move.py +++ b/fixco_custom/models/account_move.py @@ -42,6 +42,22 @@ class AccountMove(models.Model): reklas_used = fields.Boolean('Reklas Used?', compute='_compute_reklas_used') reklas_used_by = fields.Many2one('account.move', string='Reklas Used By', compute='_compute_reklas_used') + def export_faktur_to_xml(self): + valid_invoices = self + + coretax_faktur = self.env['coretax.faktur'].create({}) + + response = coretax_faktur.export_to_download( + invoices=valid_invoices + ) + + valid_invoices.write({ + 'is_efaktur_exported': True, + 'date_efaktur_exported': datetime.utcnow(), + }) + + return response + @api.depends('line_ids.reconciled', 'line_ids.matching_number') def _compute_reklas_used(self): for move in self: |
