mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
* [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>
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
# Copyright 2020 Jose Luis Algara (Alda Hotels <https://www.aldahotels.es>)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class HouseKeepingTask(models.Model):
|
|
_name = "pms.housekeeping.task"
|
|
_description = "HouseKeeping Tasks"
|
|
# HouseKeeping 'Task types'
|
|
|
|
# Fields declaration
|
|
active = fields.Boolean("Active", default=True)
|
|
name = fields.Char("Task Name", translate=True, required=True)
|
|
pms_property_ids = fields.Many2many(
|
|
string="Properties",
|
|
help="Properties with access to the element;"
|
|
" if not set, all properties can access",
|
|
required=False,
|
|
comodel_name="pms.property",
|
|
relation="pms_housekeepink_task_pms_property_rel",
|
|
column1="pms_housekeepink_task_id",
|
|
column2="pms_property_id",
|
|
ondelete="restrict",
|
|
check_pms_properties=True,
|
|
)
|
|
|
|
clean_type = fields.Selection(
|
|
string="Clean type",
|
|
selection=[
|
|
("occupied", "Occupied"),
|
|
("exit", "Exit"),
|
|
("picked_up", "Picked up"),
|
|
("staff", "Staff"),
|
|
("clean", "Clean"),
|
|
("inspected", "Inspected"),
|
|
("dont_disturb", "Don't disturb"),
|
|
],
|
|
)
|
|
def_employee_id = fields.Many2one(
|
|
"hr.employee", string="Employee assigned by default"
|
|
)
|