mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD]multi_pms_properties (#66)
* [WIP]pms: models check_pms_property * [WIP][IMP+REF] multi_pms_properties: refactor and added test skeleton * [FIX] inherit create models * [ADD] room multiproperty check * [ADD] room multiproperty check * [IMP] Multiproperty checks in pms models * [IMP] Fix Multiproperty checks in pms models * [IMP] Add multiproperty domain in multi_pms_properties module * [IMP] Fix multiproperty checks in pms tests * [IMP] Fix multiproperty checks logic * [IMP] Auto Domains * [IMP] availability property results, domain preferred_room_id * [IMP] model domain properties * [ADD] pms multiproperty depends * [IMP] models and views multiproperty checks * [FIX] Multiple rebase multiproperty fixes * [ADD] Readme * [ADD] Company - multiproperty checks * [ADD] travis server wide modules multiproperty * [FIX] travis conf load * [FIX] travis conf load2 * [FIX] travis conf load2 Co-authored-by: Eric Antones <eantones@nuobit.com> Co-authored-by: Sara Lago <saralago126@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ _logger = logging.getLogger(__name__)
|
||||
class PmsService(models.Model):
|
||||
_name = "pms.service"
|
||||
_description = "Services and its charges"
|
||||
_check_pms_properties_auto = True
|
||||
|
||||
name = fields.Char(
|
||||
string="Service description",
|
||||
@@ -26,6 +27,7 @@ class PmsService(models.Model):
|
||||
required=True,
|
||||
comodel_name="product.product",
|
||||
ondelete="restrict",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
folio_id = fields.Many2one(
|
||||
string="Folio",
|
||||
@@ -34,6 +36,7 @@ class PmsService(models.Model):
|
||||
store=True,
|
||||
comodel_name="pms.folio",
|
||||
compute="_compute_folio_id",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
sale_line_ids = fields.One2many(
|
||||
string="Sale Lines",
|
||||
@@ -41,6 +44,7 @@ class PmsService(models.Model):
|
||||
copy=False,
|
||||
comodel_name="folio.sale.line",
|
||||
inverse_name="service_id",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
reservation_id = fields.Many2one(
|
||||
string="Room",
|
||||
@@ -48,6 +52,7 @@ class PmsService(models.Model):
|
||||
default=lambda self: self._default_reservation_id(),
|
||||
comodel_name="pms.reservation",
|
||||
ondelete="cascade",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
service_line_ids = fields.One2many(
|
||||
string="Service Lines",
|
||||
@@ -57,6 +62,7 @@ class PmsService(models.Model):
|
||||
comodel_name="pms.service.line",
|
||||
inverse_name="service_id",
|
||||
compute="_compute_service_line_ids",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
string="Company",
|
||||
|
||||
Reference in New Issue
Block a user