Skip to content

Commit

Permalink
[FIX] public_budget: bank standing account
Browse files Browse the repository at this point in the history
Ticker: 58152
X-original-commit: 4772046
  • Loading branch information
pablohmontenegro committed Dec 27, 2022
1 parent 2e1c2a2 commit 869edcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public_budget/models/funding_move.py
Expand Up @@ -107,14 +107,16 @@ def action_confirm(self):
'No Income account defined on the funding move or the '
'budget'))
if rec.type == 'refund':
account_id = rec.journal_id.default_account_id.id
method_lines = rec.journal_id.outbound_payment_method_line_ids
debit = 0.0
credit = rec.amount
else:
account_id = rec.journal_id.default_account_id.id
method_lines = rec.journal_id.inbound_payment_method_line_ids
credit = 0.0
debit = rec.amount

account_id = method_lines.filtered(lambda x: x.code == 'manual')[:1].payment_account_id.id or method_lines[:1].payment_account_id.id

move_line1 = {
'name': rec.name[:64],
'date': rec.date,
Expand Down

0 comments on commit 869edcb

Please sign in to comment.