Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] [17.0] hotel reservation #209

Open
wants to merge 18 commits into
base: 17.0
Choose a base branch
from

Conversation

Rajan-SCS
Copy link

Migrated By Raishkhan Pathan
TODO : Need to migrate JS part

maitripatel19 and others added 15 commits April 23, 2024 15:20
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-hotel-14.0/vertical-hotel-14.0-hotel_reservation
Translate-URL: https://translation.odoo-community.org/projects/vertical-hotel-14-0/vertical-hotel-14-0-hotel_reservation/
Currently translated at 62.8% (98 of 156 strings)

Translation: vertical-hotel-14.0/vertical-hotel-14.0-hotel_reservation
Translate-URL: https://translation.odoo-community.org/projects/vertical-hotel-14-0/vertical-hotel-14-0-hotel_reservation/fr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-hotel-15.0/vertical-hotel-15.0-hotel_reservation
Translate-URL: https://translation.odoo-community.org/projects/vertical-hotel-15-0/vertical-hotel-15-0-hotel_reservation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-hotel-15.0/vertical-hotel-15.0-hotel_reservation
Translate-URL: https://translation.odoo-community.org/projects/vertical-hotel-15-0/vertical-hotel-15-0-hotel_reservation/
{
"name": "Hotel Reservation Management",
"version": "17.0.1.0.0",
"author": "Odoo Community Association (OCA), Serpent Consulting \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"author": "Odoo Community Association (OCA), Serpent Consulting \
"author": "Odoo Community Association (OCA),
Serpent Consulting Services Pvt. Ltd.,
Odoo S.A",

"report/report_view.xml",
"wizards/hotel_reservation_wizard.xml",
],
# "assets": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code if not require

[("reservation_id", "=", folio.reservation_id.id)]
)
if len(reservations) == 1:
for line in folio.reservation_id.reservation_line:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of looping each reservation line, update in batch
example:

if len(reservations) == 1:
            update_vals = []
            for line in folio.reservation_id.reservation_line:
                for room in line.reserve:
                    update_vals.append({
                        "room_id": room.id,
                        "check_in": folio.checkin_date,
                        "check_out": folio.checkout_date,
                        "state": "assigned",
                        "reservation_id": folio.reservation_id.id,
                    })
                    
            if update_vals:
                reservations.write(update_vals[0])

reservation_line_obj = self.env["hotel.room.reservation.line"]
for folio in self:
reservations = reservation_line_obj.search(
[("reservation_id", "=", folio.reservation_id.id)]
)
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need of this whitespace change.

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.