mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Merge branch 'oca-8.0' into 8.0
This commit is contained in:
@@ -158,6 +158,7 @@ class PaymentOrder(models.Model):
|
||||
partner_id = False
|
||||
name = '%s %s' % (
|
||||
labels[self.payment_order_type], self.reference)
|
||||
date_maturity = payment_lines[0].date
|
||||
vals = {
|
||||
'name': name,
|
||||
'move_id': move.id,
|
||||
@@ -167,7 +168,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
|
||||
@@ -260,8 +262,10 @@ class PaymentOrder(models.Model):
|
||||
total_amount, move, lines, labels)
|
||||
aml_obj.create(trf_ml_vals)
|
||||
|
||||
# post account move
|
||||
move.post()
|
||||
# consider entry_posted on account_journal
|
||||
if move.journal_id.entry_posted:
|
||||
# post account move
|
||||
move.post()
|
||||
|
||||
# State field is written by act_sent_wait
|
||||
self.write({'date_sent': fields.Date.context_today(self)})
|
||||
|
||||
Reference in New Issue
Block a user