mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX+IMP] account_payment_order: 2 more things:
* IMP: extensibility of _prepare_move Pass the list of bank lines to _prepare_move so it is possible to customize the move (eg it's name) based on the lines being paid. * FIX: payment order: add missing onchange dependencies in move selection wizard
This commit is contained in:
committed by
Pedro M. Baeza
parent
03684a5092
commit
e3f19d9d1b
@@ -330,7 +330,7 @@ class AccountPaymentOrder(models.Model):
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def _prepare_move(self):
|
||||
def _prepare_move(self, bank_lines=None):
|
||||
if self.payment_type == 'outbound':
|
||||
ref = _('Payment order %s') % self.name
|
||||
else:
|
||||
@@ -433,7 +433,7 @@ class AccountPaymentOrder(models.Model):
|
||||
trfmoves[hashcode] = bline
|
||||
|
||||
for hashcode, blines in trfmoves.iteritems():
|
||||
mvals = self._prepare_move()
|
||||
mvals = self._prepare_move(blines)
|
||||
total_company_currency = total_payment_currency = 0
|
||||
for bline in blines:
|
||||
total_company_currency += bline.amount_company_currency
|
||||
|
||||
@@ -140,7 +140,8 @@ class AccountPaymentLineCreate(models.TransientModel):
|
||||
return action
|
||||
|
||||
@api.onchange(
|
||||
'date_type', 'move_date', 'due_date', 'journal_ids', 'invoice')
|
||||
'date_type', 'move_date', 'due_date', 'journal_ids', 'invoice',
|
||||
'target_move', 'allow_blocked', 'payment_mode')
|
||||
def move_line_filters_change(self):
|
||||
domain = self._prepare_move_line_domain()
|
||||
res = {'domain': {'move_line_ids': domain}}
|
||||
|
||||
Reference in New Issue
Block a user