mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
There's a chance that the recently created journal is selected for a
payment acquirer thanks to this open compute:
c5346c04a2/addons/payment/models/payment_acquirer.py (L171-L180)
and thus, when trying to unlink it, we get:
odoo.exceptions.UserError: You must first deactivate a payment acquirer before deleting its journal.
For avoiding this situation in integration tests, we do:
- Assign a higher sequence for being the last existing journal.
- Remove the payment method lines associated to the journal.