mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] account_banking_payment_transfer: Use payment line date as the maturity date for the new move
This commit is contained in:
@@ -154,10 +154,12 @@ class PaymentOrder(models.Model):
|
||||
partner_id = payment_lines[0].partner_id.id
|
||||
name = _('%s line %s') % (
|
||||
labels[self.payment_order_type], payment_lines[0].name)
|
||||
date_maturity = payment_lines[0].date
|
||||
else:
|
||||
partner_id = False
|
||||
name = '%s %s' % (
|
||||
labels[self.payment_order_type], self.reference)
|
||||
date_maturity = False
|
||||
vals = {
|
||||
'name': name,
|
||||
'move_id': move.id,
|
||||
@@ -167,7 +169,8 @@ class PaymentOrder(models.Model):
|
||||
amount or 0.0),
|
||||
'debit': (self.payment_order_type == 'debit' and
|
||||
amount or 0.0),
|
||||
}
|
||||
'date_maturity': date_maturity,
|
||||
}
|
||||
return vals
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user