Code review (#62)

* [REF] pms: refactor amenity type

* [REF] pms: refactor amenity

* [REF]Refactor amenity views and demo data

* [WIP] master model 2nd day

* [WIP] Master model refactor

* [WIP] Refactor in tests

* [WIP] Add mandatory sequence in pms_property at tests and fix create in folio, reservation and checkin

* [WIP] Test refactor

* [WIP]Refactor pms_room, pms_room_clousure_reason and pms_room_type

* [WIP]review of guidelines in master models

* [WIP]test refactor

* [WIP]review guidelines in master models 2

* [WIP] fixed fields in pms_l10n_es

* [WIP]Refactor product_product, product_template, res_company, res_partner and res_user

* [IMP] Add common.py for tests

* [WIP] Refactor fields in pms.folio and pms.reservation

* [WIP] Review guidelines in pms.reservation, pms.reservation.line and rename availability models

* [WIP] Rename availability models

* [WIP] Refactor availability models

* [WIP] Refactor availity models 2

* [WIP] Pms: add sequences creation in pms_property create

* [WIP] Fix sequence creation in pmp.property

* [REF] Refactor fields in res_partner and rename date_overnight

* [REF] Refactoring master models tests

* [FIX] Fix sequence create in pms.reservation

* [REF] Refactor helps in master and availability models

* [IMP] Extend test coverage in test_pms_reservation

* [REF] Refactor fields in pms_reservation

* [REF] Refactor fields in pms_reservation 2

* [REF] Refactor fields in service flow

* [REF] Refactor pms_reservation

* [REF] Refactor pms_reservation 2

* [REF] draft button removed from view

* [REF] change no_show to arrival_delayed in field state of pms_reservation

* [REF] Add compute_preferred_room_id in pms_reservation

* [REF] Fix cache problem in test_reservation_action_checkout

Co-authored-by: braisab <braisterbutalino@gmail.com>
Co-authored-by: Sara Lago <saralago126@gmail.com>
Co-authored-by: Brais Abeijón <>
This commit is contained in:
Miguel Padin
2021-04-15 01:01:11 +02:00
committed by GitHub
parent eace7de663
commit 0d03152402
79 changed files with 3920 additions and 2480 deletions

View File

@@ -7,9 +7,24 @@ class RoomClosureReason(models.Model):
_name = "room.closure.reason"
_description = "Cause of out of service"
# Fields declaration
name = fields.Char("Name", translate=True, required=True)
pms_property_ids = fields.Many2many(
"pms.property", string="Properties", required=False, ondelete="restrict"
name = fields.Char(
string="Name",
help="The name that identifies the room closure reason",
required=True,
translate=True,
)
pms_property_ids = fields.Many2many(
string="Properties",
help="Properties with access to the element;"
" if not set, all properties can access",
comodel_name="pms.property",
relation="pms_room_closure_reason_pms_property_rel",
column1="room_closure_reason_type_id",
column2="pms_property_id",
ondelete="restrict",
)
description = fields.Text(
string="Description",
help="Explanation of the reason for closing a room",
translate=True,
)
description = fields.Text("Description", translate=True)