[FIX] account: missing the argument while make payment

This issue occur When the customer tries to make a payment from Accounting
Dashboard of account module,at that time the error will be generated.

step to reproduce:
- install the `Accounting`.
- open the `Accounting`.
- go to `Accounting  Dashboard`
- click on this `⋮` of bank (Right side of top)
- click on the payment of view
- the error will be generated.

error- TypeError
       account_journal.open_payments_action() missing 1 required positional
       argument: 'payment_type'

(1) -  https://github.com/odoo/enterprise/pull/49762

accounting to this (1) PR, One link to "Payments" is enough (rather than
customer,Payments, Vendor Payments, Internal Transfers) > Those filters exist
in the list view of payments

after this commit ,The customer will see "account all payments" if they click on
the payment screen.

sentry-4620831582

closes odoo/odoo#142649

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
This commit is contained in:
sabr
2023-11-27 12:39:52 +00:00
parent 9e32ac4292
commit a652bb86cf
@@ -767,7 +767,7 @@ class account_journal(models.Model):
action['domain'] = (action['domain'] or []) + [('journal_id', '=', self.id)]
return action
def open_payments_action(self, payment_type, mode='tree'):
def open_payments_action(self, payment_type=False, mode='tree'):
if payment_type == 'outbound':
action_ref = 'account.action_account_payments_payable'
elif payment_type == 'transfer':