diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-03 15:39:41 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-06-03 15:39:41 +0700 |
| commit | 3307dcbdb37285bcd43a719a0ecbc1453e4af9df (patch) | |
| tree | 81103ea011c3689b3c52304ba1f3e05d31a55853 /fixco_api/models/invoice.py | |
| parent | 50054732da991bdd966f4fba879c33ee853879ff (diff) | |
upload payments
Diffstat (limited to 'fixco_api/models/invoice.py')
| -rwxr-xr-x | fixco_api/models/invoice.py | 4 |
1 files changed, 2 insertions, 2 deletions
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, |
