mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Merge pull request #285 from OCA/sbidoul-patch-1
[IMP] account_payment_order: extensibility of _prepare_move
This commit is contained in:
@@ -330,7 +330,7 @@ class AccountPaymentOrder(models.Model):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _prepare_move(self):
|
def _prepare_move(self, bank_lines=None):
|
||||||
if self.payment_type == 'outbound':
|
if self.payment_type == 'outbound':
|
||||||
ref = _('Payment order %s') % self.name
|
ref = _('Payment order %s') % self.name
|
||||||
else:
|
else:
|
||||||
@@ -433,7 +433,7 @@ class AccountPaymentOrder(models.Model):
|
|||||||
trfmoves[hashcode] = bline
|
trfmoves[hashcode] = bline
|
||||||
|
|
||||||
for hashcode, blines in trfmoves.iteritems():
|
for hashcode, blines in trfmoves.iteritems():
|
||||||
mvals = self._prepare_move()
|
mvals = self._prepare_move(blines)
|
||||||
total_company_currency = total_payment_currency = 0
|
total_company_currency = total_payment_currency = 0
|
||||||
for bline in blines:
|
for bline in blines:
|
||||||
total_company_currency += bline.amount_company_currency
|
total_company_currency += bline.amount_company_currency
|
||||||
|
|||||||
Reference in New Issue
Block a user