mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Multiproperty Constrains (#30)
* [IMP] add multiproperties demo data * [IMP] add multiproperties checks in res_users * [IMP] add test case in test_res_users * [IMP] Add multiproperty checks in pms_amenity and pms_amenity_type * [IMP] Add multiproperty in pms_board_service_room_type(pending review) * [IMP] Add test case in test_pms_room_type_availability_rule to check multiproperties * [IMP] Fixing test case in test_pms_room_type_availability_rule to check multiproperties * [IMP] Add test case in test_pms_room_type_availability_rule * [IMP] Removed field default_availability_plan_id from pms_property * [IMP] Add multiproperty in pms_room_type_available_plan * [IMP] pms: adding property in rooms_available * [IMP] Add multiproperty in pms_room_type_availability_rule and product_pricelist(work in progress) * [IMP] Add multiproperty in product_pricelist and product_pricelist_item * [IMP] add multiproperties demo data * [IMP] add multiproperties checks in res_users * [IMP] add test case in test_res_users and pms_room_type_availability_rule * [IMP] Add multiproperty checks in pms_amenity and pms_amenity_type * [IMP] Add multiproperty in pms_board_service_room_type(pending review) * [IMP] Removed field default_availability_plan_id from pms_property * [IMP] Add multiproperty in pms_room_type_available_plan * [IMP] pms: adding property in rooms_available * [IMP] Add multiproperty in pms_room_type_availability_rule and product_pricelist(work in progress) * [IMP] Add multiproperty in product_pricelist and product_pricelist_item * [IMP] Pms: add compute_folio method in pms.service * [IMP] Pms: add multiproperty integrity checks between room_type and its class * [IMP] Pms: pms_property_id related to folio * [IMP] Pms: add multiproperty integrity checks in pms_room with pms_room_type and pms_floor * [IMP] Pms: adding multiproperty checks in room_type(work in progress) * [IMP] Pms: Add property rules * [FIX]pms: external ids security rules * [FIX]pms: property checks * [FIX]pms: get product on pricelist item multiproperty check * [FIX]pms: delete test field default_plan * [FIX]pms: property constrain to product from room type model * [FIX]pms: ids references * [IMP]pms: folio wizard price flow on odoo standar Co-authored-by: Darío Lodeiros <dario@commitsun.com>
This commit is contained in:
@@ -13,11 +13,6 @@ class PmsCheckinPartner(models.Model):
|
||||
_name = "pms.checkin.partner"
|
||||
_description = "Partner Checkins"
|
||||
|
||||
@api.model
|
||||
def _get_default_pms_property(self):
|
||||
# TODO: Change by property env variable (like company)
|
||||
return self.env.user.pms_property_id
|
||||
|
||||
# Fields declaration
|
||||
identifier = fields.Char(
|
||||
"Identifier", readonly=True, index=True, default=lambda self: _("New")
|
||||
@@ -33,7 +28,7 @@ class PmsCheckinPartner(models.Model):
|
||||
store=True,
|
||||
)
|
||||
pms_property_id = fields.Many2one(
|
||||
"pms.property", default=_get_default_pms_property, required=True
|
||||
"pms.property", store=True, readonly=True, related="folio_id.pms_property_id"
|
||||
)
|
||||
name = fields.Char(
|
||||
"Name",
|
||||
|
||||
Reference in New Issue
Block a user