summaryrefslogtreecommitdiff
path: root/fixco_api/models/invoice.py
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_api/models/invoice.py')
-rwxr-xr-xfixco_api/models/invoice.py4
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,