[FIX] the line's bank account is the other party's
bank account, not ourspull/283/head
parent
1c170d3138
commit
71407c898e
|
@ -40,15 +40,10 @@ class AccountBankStatementLine(models.Model):
|
||||||
select order_id from order_sums where amount = %s''',
|
select order_id from order_sums where amount = %s''',
|
||||||
(Decimal(float_repr(abs(this.amount), digits)),))
|
(Decimal(float_repr(abs(this.amount), digits)),))
|
||||||
order_ids = [i for i, in self.env.cr.fetchall()]
|
order_ids = [i for i, in self.env.cr.fetchall()]
|
||||||
# verify that this ids are accessible to the user and from the
|
# verify that this ids are accessible to the user
|
||||||
# right bank account if applicable
|
|
||||||
domain = [
|
domain = [
|
||||||
('id', 'in', order_ids),
|
('id', 'in', order_ids),
|
||||||
]
|
]
|
||||||
if this.bank_account_id.acc_number:
|
|
||||||
domain.append(
|
|
||||||
('mode.bank_id.acc_number', '=',
|
|
||||||
this.bank_account_id.acc_number))
|
|
||||||
return self.env['payment.order'].search(domain)
|
return self.env['payment.order'].search(domain)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|
Loading…
Reference in New Issue