mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
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:
@@ -9,27 +9,36 @@ class ProductTemplate(models.Model):
|
||||
_inherit = "product.template"
|
||||
|
||||
pms_property_ids = fields.Many2many(
|
||||
comodel_name="pms.property",
|
||||
relation="product_template_property_rel",
|
||||
column1="product_tmpl_id",
|
||||
column2="property_id",
|
||||
string="Properties",
|
||||
help="Properties with access to the element;"
|
||||
" if not set, all properties can access",
|
||||
required=False,
|
||||
ondelete="restrict",
|
||||
comodel_name="pms.property",
|
||||
relation="product_template_pms_property_rel",
|
||||
column1="product_tmpl_id",
|
||||
column2="pms_property_id",
|
||||
)
|
||||
per_day = fields.Boolean(
|
||||
string="Unit increment per day",
|
||||
help="Indicates that the product is sold by days",
|
||||
)
|
||||
per_person = fields.Boolean(
|
||||
string="Unit increment per person",
|
||||
help="Indicates that the product is sold per person",
|
||||
)
|
||||
per_day = fields.Boolean("Unit increment per day")
|
||||
per_person = fields.Boolean("Unit increment per person")
|
||||
consumed_on = fields.Selection(
|
||||
[("before", "Before night"), ("after", "After night")],
|
||||
"Consumed",
|
||||
string="Consumed",
|
||||
help="Indicates when the product is consumed",
|
||||
selection=[("before", "Before night"), ("after", "After night")],
|
||||
default="before",
|
||||
)
|
||||
daily_limit = fields.Integer("Daily limit")
|
||||
is_extra_bed = fields.Boolean("Is extra bed", default=False)
|
||||
show_in_calendar = fields.Boolean(
|
||||
"Show in Calendar",
|
||||
daily_limit = fields.Integer(
|
||||
string="Daily limit", help="Indicates how much products can consumed in one day"
|
||||
)
|
||||
is_extra_bed = fields.Boolean(
|
||||
string="Is extra bed",
|
||||
help="Indicates if that product is a extra bed, add +1 capacity in the room",
|
||||
default=False,
|
||||
help="Specifies if the product is shown in the calendar information.",
|
||||
)
|
||||
|
||||
@api.constrains("pms_property_ids", "company_id")
|
||||
|
||||
Reference in New Issue
Block a user