summaryrefslogtreecommitdiff
path: root/addons/payment/models
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2018-02-26 16:00:12 +0100
committerYannick Tivisse <yti@odoo.com>2018-02-26 17:17:33 +0100
commit6f614c325421d0bbc1c3a7db2588f266fe605da9 (patch)
treee863c8495753448eb0fbe3fe4feece08a6db0390 /addons/payment/models
parentdc6913e2e0e901ec9e577afbb52997389a97e103 (diff)
[FIX] payment: Be less resrictive for payment journals on acquires
Purpose ======= It looks a little to restrictive to only allow bank journals on payment acquirers. For example on could want to define a manual payment acquirer linked with a journal of type "cash". Allow both journal types instead of only bank.
Diffstat (limited to 'addons/payment/models')
-rw-r--r--addons/payment/models/payment_acquirer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py
index 05958214210..6a9db68cb1f 100644
--- a/addons/payment/models/payment_acquirer.py
+++ b/addons/payment/models/payment_acquirer.py
@@ -77,8 +77,8 @@ class PaymentAcquirer(models.Model):
help="Capture the amount from Odoo, when the delivery is completed.")
# Formerly associated to `generate_and_pay_invoice` option from auto_confirm
journal_id = fields.Many2one(
- 'account.journal', 'Payment Journal', domain=[('type', '=', 'bank')],
- default=lambda self: self.env['account.journal'].search([('type', '=', 'bank')], limit=1),
+ 'account.journal', 'Payment Journal', domain=[('type', 'in', ['bank', 'cash'])],
+ default=lambda self: self.env['account.journal'].search([('type', 'in', ['bank', 'cash'])], limit=1),
help="""Payments will be registered into this journal. If you get paid straight on your bank account,
select your bank account. If you get paid in batch for several transactions, create a specific
payment journal for this payment acquirer to easily manage the bank reconciliation. You hold