[IMP]pms: allowd journal filters by room #306
Open
+109
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the
pms
module, primarily focusing on adding room filtering capabilities to various models and methods. The most important changes include the addition of new fields to theAccountJournal
model, updates to methods to accommodate room filtering, and modifications to the XML views to include the new fields.Model Updates:
allowed_room_ids
androom_filter_ids
fields to theAccountJournal
model to filter rooms in reservations (pms/models/account_journal.py
).Method Enhancements:
_compute_allowed_room_ids
method to compute allowed room IDs based on property IDs (pms/models/account_journal.py
)._prepare_invoice
method to pass room IDs when getting the default journal (pms/models/pms_folio.py
)._get_payment_methods
method to filter payment methods by room IDs (pms/models/pms_property.py
). [1] [2]_get_folio_default_journal
method to filter journals by room IDs for both simplified and normal invoices (pms/models/pms_property.py
). [1] [2]View Modifications:
allowed_room_ids
androom_filter_ids
fields to the account journal form view (pms/views/account_journal_views.xml
).