From 00cef25ec129ea61edb6cbd171872e833baf2c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Tue, 12 Oct 2021 19:59:39 +0200 Subject: [PATCH] [IMP]pms: journal filter manual payment allowed --- pms/models/account_journal.py | 4 ++++ pms/models/pms_property.py | 1 + pms/views/account_journal_views.xml | 1 + 3 files changed, 6 insertions(+) diff --git a/pms/models/account_journal.py b/pms/models/account_journal.py index ca1266390..c7afb21cf 100644 --- a/pms/models/account_journal.py +++ b/pms/models/account_journal.py @@ -19,3 +19,7 @@ class AccountJournal(models.Model): help="The company for Account Jouarnal", check_pms_properties=True, ) + allowed_pms_payments = fields.Boolean( + string="For manual payments", + help="Use to pay for reservations", + ) diff --git a/pms/models/pms_property.py b/pms/models/pms_property.py index 4069b5ab9..27dcfcb56 100644 --- a/pms/models/pms_property.py +++ b/pms/models/pms_property.py @@ -408,6 +408,7 @@ class PmsProperty(models.Model): self.ensure_one() payment_methods = self.env["account.journal"].search( [ + ("allowed_pms_payments", "=", True), "&", ("type", "in", ["cash", "bank"]), "|", diff --git a/pms/views/account_journal_views.xml b/pms/views/account_journal_views.xml index 0dfa4250c..f787708c8 100644 --- a/pms/views/account_journal_views.xml +++ b/pms/views/account_journal_views.xml @@ -6,6 +6,7 @@ +