From 3307dcbdb37285bcd43a719a0ecbc1453e4af9df Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 3 Jun 2025 15:39:41 +0700 Subject: upload payments --- fixco_api/models/invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fixco_api/models/invoice.py') diff --git a/fixco_api/models/invoice.py b/fixco_api/models/invoice.py index 33d74fa..9553ff0 100755 --- a/fixco_api/models/invoice.py +++ b/fixco_api/models/invoice.py @@ -6,7 +6,7 @@ from odoo.exceptions import RedirectWarning, UserError, ValidationError, AccessE class Invoice(models.Model): _inherit = 'account.move' - def _register_payment_automatically(self): + def _register_payment_automatically(self, date): payment_model = self.env['account.payment'] for invoice in self: @@ -16,7 +16,7 @@ class Invoice(models.Model): 'partner_type': 'customer', 'partner_id': invoice.partner_id.id, 'amount': invoice.amount_residual, - 'date': invoice.invoice_date, + 'date': date, 'journal_id': invoice.partner_id.ginee_journal_id.id or 24, 'payment_method_id': self.env.ref('account.account_payment_method_manual_in').id, 'ref': invoice.name, -- cgit v1.2.3