mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD]pms: product pms enabled configuration
This commit is contained in:
@@ -180,6 +180,7 @@ class FolioSaleLine(models.Model):
|
|||||||
store=True,
|
store=True,
|
||||||
comodel_name="product.product",
|
comodel_name="product.product",
|
||||||
domain="[('sale_ok', '=', True),\
|
domain="[('sale_ok', '=', True),\
|
||||||
|
('is_pms_available', '=', True),\
|
||||||
'|', ('company_id', '=', False), \
|
'|', ('company_id', '=', False), \
|
||||||
('company_id', '=', company_id)]",
|
('company_id', '=', company_id)]",
|
||||||
ondelete="restrict",
|
ondelete="restrict",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class PmsBoardServiceRoomTypeLine(models.Model):
|
|||||||
comodel_name="product.product",
|
comodel_name="product.product",
|
||||||
readonly=True,
|
readonly=True,
|
||||||
check_pms_properties=True,
|
check_pms_properties=True,
|
||||||
|
domain="[('is_pms_available', '=', True)]",
|
||||||
)
|
)
|
||||||
# TODO def default_amount "amount of service"
|
# TODO def default_amount "amount of service"
|
||||||
amount = fields.Float(
|
amount = fields.Float(
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class PmsService(models.Model):
|
|||||||
comodel_name="product.product",
|
comodel_name="product.product",
|
||||||
ondelete="restrict",
|
ondelete="restrict",
|
||||||
check_pms_properties=True,
|
check_pms_properties=True,
|
||||||
|
domain="[(is_pms_available, '=', True)]",
|
||||||
)
|
)
|
||||||
folio_id = fields.Many2one(
|
folio_id = fields.Many2one(
|
||||||
string="Folio",
|
string="Folio",
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ class ProductTemplate(models.Model):
|
|||||||
help="Indicates if that product is a crib",
|
help="Indicates if that product is a crib",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
is_pms_available = fields.Boolean(
|
||||||
|
string="Is available in PMS",
|
||||||
|
help="Indicates if that product is available in PMS",
|
||||||
|
default=True,
|
||||||
|
)
|
||||||
|
|
||||||
@api.depends_context("allowed_pms_property_ids")
|
@api.depends_context("allowed_pms_property_ids")
|
||||||
def _compute_daily_limit(self):
|
def _compute_daily_limit(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user