mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] 14.0 pms housekeeping (#44)
* [IMP] housekeeping first commint * [ADD] Demo data * [ADD] Models * [FIX] demo notes * [IMP] Housekeeping basics * [IMP] PMS Housekeeping Task and Rack management * [FIX] Icons and date parameter * [ADD] Today tasks kanban * [ADD] Housekeeping form View * [ADD] Housekeeping Lost & Found * [ADD] Precommit and README Co-authored-by: Darío Lodeiros <dario@commitsun.com>
This commit is contained in:
78
pms_housekeeping/README.rst
Normal file
78
pms_housekeeping/README.rst
Normal file
@@ -0,0 +1,78 @@
|
||||
============
|
||||
Housekeeping
|
||||
============
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpms-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/pms/tree/14.0/pms_housekeeping
|
||||
:alt: OCA/pms
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/pms-14-0/pms-14-0-pms_housekeeping
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/293/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module is an all-in-one property management system (PMS) focused on medium-sized hotels
|
||||
for managing every aspect of your property's daily operations.
|
||||
|
||||
You can manage hotel properties with multi-hotel and multi-company support, including your rooms inventory,
|
||||
reservations, check-in, daily reports, board services, rate and availability plans among other hotel functionalities.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pms/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/pms/issues/new?body=module:%20pms_housekeeping%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Jose Luis Algara
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Jose Luis Algara
|
||||
* Darío Lodeiros
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/pms <https://github.com/OCA/pms/tree/14.0/pms_housekeeping>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
1
pms_housekeeping/__init__.py
Normal file
1
pms_housekeeping/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
29
pms_housekeeping/__manifest__.py
Normal file
29
pms_housekeeping/__manifest__.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Copyright 2020-21 Jose Luis Algara (Alda Hotels <https://www.aldahotels.es>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
"name": "Housekeeping",
|
||||
"version": "14.0.1.0.1",
|
||||
"author": "Jose Luis Algara, " "Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": True,
|
||||
"category": "pms",
|
||||
"website": "https://github.com/OCA/pms",
|
||||
"depends": [
|
||||
"pms",
|
||||
"hr",
|
||||
],
|
||||
"data": [
|
||||
# "wizard/housekeeping_rack.xml",
|
||||
"views/pms_room_view.xml",
|
||||
"views/pms_reservation_view.xml",
|
||||
"views/pms_housekeeping_task_view.xml",
|
||||
"views/pms_housekeeping_views.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"data/cron_jobs.xml",
|
||||
],
|
||||
"demo": [
|
||||
"demo/pms_housekeeping.xml",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
21
pms_housekeeping/data/cron_jobs.xml
Normal file
21
pms_housekeeping/data/cron_jobs.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data noupdate="0">
|
||||
<!-- Set all task -->
|
||||
<record model="ir.cron" id="add_all_today_tasks">
|
||||
<field name="name">Automatic add all today housekeeping tasks</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="user_id" ref="base.user_root" />
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall" eval="False" />
|
||||
<field name="state">code</field>
|
||||
<field name="model_id" ref="model_pms_room" />
|
||||
<field
|
||||
name="nextcall"
|
||||
eval="(DateTime.now() + timedelta(days=1)).strftime('%Y-%m-%d 03:00:00')"
|
||||
/>
|
||||
<field name="code">model.add_all_today_tasks()</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
65
pms_housekeeping/demo/pms_housekeeping.xml
Normal file
65
pms_housekeeping/demo/pms_housekeeping.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- pms.housekeeping.task -->
|
||||
<record id="pms_housekeeping_task_0" model="pms.housekeeping.task">
|
||||
<field name="name">Full clean</field>
|
||||
<field name="clean_type">exit</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_task_1" model="pms.housekeeping.task">
|
||||
<field name="name">Soft clean</field>
|
||||
<field name="clean_type">occupied</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_task_2" model="pms.housekeeping.task">
|
||||
<field name="name">Review</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_task_3" model="pms.housekeeping.task">
|
||||
<field name="name">Inspect</field>
|
||||
<field name="def_employee_id" ref="hr.employee_vad" />
|
||||
<field name="clean_type">exit</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_task_4" model="pms.housekeeping.task">
|
||||
<field name="name">Inspect</field>
|
||||
<field name="def_employee_id" ref="hr.employee_vad" />
|
||||
<field name="clean_type">occupied</field>
|
||||
</record>
|
||||
<!-- pms.housekeeping -->
|
||||
<record id="pms_housekeeping_0" model="pms.housekeeping">
|
||||
<field name="room_id" ref="pms.pms_room_4" />
|
||||
<field name="employee_id" ref="hr.employee_jep" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_0" />
|
||||
<field name="state">to_do</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_1" model="pms.housekeeping">
|
||||
<field name="room_id" ref="pms.pms_room_3" />
|
||||
<field name="employee_id" ref="hr.employee_jep" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_0" />
|
||||
<field name="state">to_do</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_2" model="pms.housekeeping">
|
||||
<field name="room_id" ref="pms.pms_room_1" />
|
||||
<field name="employee_id" ref="hr.employee_jep" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_1" />
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_3" model="pms.housekeeping">
|
||||
<field name="room_id" ref="pms.pms_room_4" />
|
||||
<field name="employee_id" ref="hr.employee_vad" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_3" />
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_4" model="pms.housekeeping">
|
||||
<field name="notes">Need clean it again</field>
|
||||
<field name="room_id" ref="pms.pms_room_2" />
|
||||
<field name="employee_id" ref="hr.employee_mit" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_2" />
|
||||
<field name="state">to_do</field>
|
||||
</record>
|
||||
<record id="pms_housekeeping_5" model="pms.housekeeping">
|
||||
<field name="room_id" ref="pms.pms_room_3" />
|
||||
<field name="employee_id" ref="hr.employee_jog" />
|
||||
<field name="task_id" ref="pms-housekeeping.pms_housekeeping_task_1" />
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
7
pms_housekeeping/models/__init__.py
Normal file
7
pms_housekeeping/models/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright 2021 Jose Luis Algara
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import pms_housekeeping_task
|
||||
from . import pms_housekeeping
|
||||
from . import pms_reservation
|
||||
from . import pms_room
|
||||
42
pms_housekeeping/models/pms_housekeeping.py
Normal file
42
pms_housekeeping/models/pms_housekeeping.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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 HouseKeeping(models.Model):
|
||||
_name = "pms.housekeeping"
|
||||
_description = "HouseKeeping"
|
||||
# HouseKeeping 'log'
|
||||
|
||||
# Fields declaration
|
||||
|
||||
task_date = fields.Date(
|
||||
string="Clean date", default=lambda self: fields.Datetime.now(), required=True
|
||||
)
|
||||
task_start = fields.Datetime(string="Task start at")
|
||||
task_end = fields.Datetime(string="Task end at")
|
||||
room_id = fields.Many2one("pms.room", string="Room")
|
||||
employee_id = fields.Many2one("hr.employee", string="Employee")
|
||||
task_id = fields.Many2one("pms.housekeeping.task", string="Task", required=True)
|
||||
notes = fields.Text("Internal Notes")
|
||||
lostfound = fields.Text("Lost and Found")
|
||||
state = fields.Selection(
|
||||
string="Task State",
|
||||
selection=[
|
||||
("draft", "Draft"),
|
||||
("to_do", "To Do"),
|
||||
("in_progress", "In Progress"),
|
||||
("done", "Done"),
|
||||
],
|
||||
default="draft",
|
||||
)
|
||||
color = fields.Integer("Color Index")
|
||||
|
||||
# Default Methods ang Gets
|
||||
def name_get(self):
|
||||
result = []
|
||||
for task in self:
|
||||
name = task.task_id.name
|
||||
result.append((task.id, name))
|
||||
return result
|
||||
32
pms_housekeeping/models/pms_housekeeping_task.py
Normal file
32
pms_housekeeping/models/pms_housekeeping_task.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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(
|
||||
"pms.property", string="Properties", required=False, ondelete="restrict"
|
||||
)
|
||||
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"
|
||||
)
|
||||
13
pms_housekeeping/models/pms_reservation.py
Normal file
13
pms_housekeeping/models/pms_reservation.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2021 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 PmsRoom(models.Model):
|
||||
_inherit = "pms.reservation"
|
||||
|
||||
dont_disturb = fields.Boolean(
|
||||
string="Dont disturb",
|
||||
default=False,
|
||||
)
|
||||
140
pms_housekeeping/models/pms_room.py
Normal file
140
pms_housekeeping/models/pms_room.py
Normal file
@@ -0,0 +1,140 @@
|
||||
# Copyright 2021 Jose Luis Algara (Alda Hotels <https://www.aldahotels.es>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def kanban_card_color(state):
|
||||
colors = {
|
||||
"occupied": 2,
|
||||
"exit": 3,
|
||||
"picked_up": 7,
|
||||
"staff": 11,
|
||||
"clean": 4,
|
||||
"inspected": 10,
|
||||
"dont_disturb": 9,
|
||||
}
|
||||
return colors[state]
|
||||
|
||||
|
||||
class PmsRoom(models.Model):
|
||||
_inherit = "pms.room"
|
||||
|
||||
housekeeping_ids = fields.One2many(
|
||||
string="Housekeeping tasks",
|
||||
comodel_name="pms.housekeeping",
|
||||
inverse_name="room_id",
|
||||
domain=[("task_date", "=", datetime.now().date())],
|
||||
)
|
||||
|
||||
clean_status = 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"),
|
||||
],
|
||||
compute="_compute_clean_status",
|
||||
# store=True,
|
||||
)
|
||||
|
||||
clean_employee_id = fields.Many2one(
|
||||
"hr.employee",
|
||||
string="Default employee",
|
||||
help="Cleaning employee assigned by default",
|
||||
)
|
||||
employee_picture = fields.Binary(
|
||||
string="Employee picture", related="clean_employee_id.image_1920"
|
||||
)
|
||||
|
||||
# @api.depends('clean_status_now')
|
||||
def _compute_clean_status(self):
|
||||
for room in self:
|
||||
room.clean_status = room.get_clean_status()
|
||||
return
|
||||
|
||||
# Business methods
|
||||
def get_clean_status(self, date_clean=False, margin_days=5):
|
||||
status = "NONE"
|
||||
if not date_clean:
|
||||
date_clean = fields.Date.today()
|
||||
reservations = self.env["pms.reservation.line"].search(
|
||||
[
|
||||
("room_id", "=", self.id),
|
||||
("date", "<=", date_clean + timedelta(days=margin_days)),
|
||||
("date", ">=", date_clean - timedelta(days=margin_days)),
|
||||
]
|
||||
)
|
||||
today_res = reservations.filtered(
|
||||
lambda reservation: reservation.date == date_clean
|
||||
)
|
||||
yesterday_res = reservations.filtered(
|
||||
lambda reservation: reservation.date == date_clean - (timedelta(days=1))
|
||||
)
|
||||
lasts_res = reservations.filtered(
|
||||
lambda reservation: reservation.date < date_clean
|
||||
)
|
||||
|
||||
if today_res.reservation_id.reservation_type == "out":
|
||||
status = "dont_disturb"
|
||||
return status
|
||||
if len(today_res) == 0:
|
||||
if len(yesterday_res) != 0:
|
||||
status = "exit"
|
||||
elif len(lasts_res) != 0:
|
||||
status = "clean"
|
||||
else:
|
||||
# TODO hace cuantos dias se limpio o repaso.??
|
||||
status = "picked_up"
|
||||
return status
|
||||
else:
|
||||
if yesterday_res.reservation_id != today_res.reservation_id:
|
||||
status = "exit"
|
||||
else:
|
||||
if today_res.reservation_id.reservation_type == "staff":
|
||||
status = "staff"
|
||||
elif today_res.reservation_id.dont_disturb:
|
||||
status = "dont_disturb"
|
||||
else:
|
||||
status = "occupied"
|
||||
# TODO hace cuantos dias que la ocupa.??
|
||||
return status
|
||||
|
||||
def add_today_tasks(self):
|
||||
for room in self:
|
||||
tasks = self.env["pms.housekeeping.task"].search(
|
||||
[("clean_type", "=", room.clean_status)]
|
||||
)
|
||||
for task in tasks:
|
||||
new_task = self.env["pms.housekeeping"]
|
||||
employee = (
|
||||
task.def_employee_id.id
|
||||
if len(task.def_employee_id) > 0
|
||||
else room.clean_employee_id.id
|
||||
)
|
||||
new_task.create(
|
||||
{
|
||||
"room_id": room.id,
|
||||
"employee_id": employee,
|
||||
"task_id": task.id,
|
||||
"state": "draft",
|
||||
"color": kanban_card_color(room.clean_status),
|
||||
}
|
||||
)
|
||||
return
|
||||
|
||||
def add_all_today_tasks(self):
|
||||
rooms = self.env["pms.room"].search([])
|
||||
_logger.warning("Init Add All today Task")
|
||||
for room in rooms:
|
||||
room.add_today_tasks()
|
||||
return
|
||||
2
pms_housekeeping/readme/CONTRIBUTORS.rst
Normal file
2
pms_housekeeping/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
* Jose Luis Algara
|
||||
* Darío Lodeiros
|
||||
5
pms_housekeeping/readme/DESCRIPTION.rst
Normal file
5
pms_housekeeping/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
This module is an all-in-one property management system (PMS) focused on medium-sized hotels
|
||||
for managing every aspect of your property's daily operations.
|
||||
|
||||
You can manage hotel properties with multi-hotel and multi-company support, including your rooms inventory,
|
||||
reservations, check-in, daily reports, board services, rate and availability plans among other hotel functionalities.
|
||||
3
pms_housekeeping/security/ir.model.access.csv
Normal file
3
pms_housekeeping/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
user_access_pms_housekeeping,user_access_pms_housekeeping,model_pms_housekeeping,pms.group_pms_user,1,1,1,1
|
||||
user_access_pms_housekeeping_task,user_access_pms_housekeeping_task,model_pms_housekeeping_task,pms.group_pms_user,1,1,1,1
|
||||
|
BIN
pms_housekeeping/static/description/icon.png
Normal file
BIN
pms_housekeeping/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
423
pms_housekeeping/static/description/index.html
Normal file
423
pms_housekeeping/static/description/index.html
Normal file
@@ -0,0 +1,423 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Housekeeping</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="housekeeping">
|
||||
<h1 class="title">Housekeeping</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/pms/tree/14.0/pms_housekeeping"><img alt="OCA/pms" src="https://img.shields.io/badge/github-OCA%2Fpms-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pms-14-0/pms-14-0-pms_housekeeping"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/293/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module is an all-in-one property management system (PMS) focused on medium-sized hotels
|
||||
for managing every aspect of your property’s daily operations.</p>
|
||||
<p>You can manage hotel properties with multi-hotel and multi-company support, including your rooms inventory,
|
||||
reservations, check-in, daily reports, board services, rate and availability plans among other hotel functionalities.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pms/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/pms/issues/new?body=module:%20pms_housekeeping%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Jose Luis Algara</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Jose Luis Algara</li>
|
||||
<li>Darío Lodeiros</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pms/tree/14.0/pms_housekeeping">OCA/pms</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
pms_housekeeping/views/pms_housekeeping_task_view.xml
Normal file
34
pms_housekeeping/views/pms_housekeeping_task_view.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_pms_housekeeping_tasks_tree" model="ir.ui.view">
|
||||
<field name="name">Housekeeping Tasks view</field>
|
||||
<field name="model">pms.housekeeping.task</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Property Ubications">
|
||||
<field name="active" colspan="1" />
|
||||
<field name="name" colspan="1" />
|
||||
<field name="clean_type" colspan="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_house_keeping_tasks_view_form">
|
||||
<field name="name">Housekeeping Tasks</field>
|
||||
<field name="res_model">pms.housekeeping.task</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem
|
||||
name="House Keeping Tasks"
|
||||
id="menu_action_pms_house_keeping_tasks_view_form"
|
||||
action="action_pms_house_keeping_tasks_view_form"
|
||||
sequence="70"
|
||||
parent="pms.configuration_others"
|
||||
/>
|
||||
</odoo>
|
||||
257
pms_housekeeping/views/pms_housekeeping_views.xml
Normal file
257
pms_housekeeping/views/pms_housekeeping_views.xml
Normal file
@@ -0,0 +1,257 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_pms_housekeeping_tree" model="ir.ui.view">
|
||||
<field name="name">Housekeeping tree view</field>
|
||||
<field name="model">pms.housekeeping</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Housekeeping tasks">
|
||||
<field name="task_date" colspan="1" />
|
||||
<field name="state" colspan="1" />
|
||||
<field name="room_id" colspan="1" />
|
||||
<field name="employee_id" colspan="1" />
|
||||
<field name="task_id" colspan="1" />
|
||||
<field name="task_start" />
|
||||
<field name="task_end" />
|
||||
<field name="notes" colspan="1" />
|
||||
<field name="lostfound" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_housekeeping_form" model="ir.ui.view">
|
||||
<field name="name">Housekeeping form view</field>
|
||||
<field name="model">pms.housekeeping</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Housekeeping">
|
||||
<sheet>
|
||||
<group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="task_id" />
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="task_date" />
|
||||
<field name="task_start" />
|
||||
<field name="state" />
|
||||
<field name="task_end" />
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="room_id" />
|
||||
<field name="employee_id" />
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="notes" />
|
||||
<field name="lostfound" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_housekeeping_rack_kanban" model="ir.ui.view">
|
||||
<field name="name">Housekeeping today tasks kanban view</field>
|
||||
<field name="model">pms.housekeeping</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<kanban
|
||||
default_group_by="employee_id"
|
||||
default_order="room_id"
|
||||
class="o_res_partner_kanban"
|
||||
sample="1"
|
||||
group_create="false"
|
||||
create="false"
|
||||
>
|
||||
<field name="color" />
|
||||
<field name="state" />
|
||||
<field name="employee_id" />
|
||||
|
||||
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-attf-class="oe_kanban_global_click
|
||||
oe_kanban_color_#{kanban_getcolor(record.color.raw_value)}"
|
||||
>
|
||||
<div class="o_dropdown_kanban dropdown">
|
||||
<!-- Top-right drop down menu here... -->
|
||||
<a
|
||||
class="dropdown-toggle btn"
|
||||
data-toggle="dropdown"
|
||||
role="button"
|
||||
href="#"
|
||||
>
|
||||
<span class="fa fa-ellipsis-v" title="menu" />
|
||||
</a>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<!-- Edit and Delete actions, if available: -->
|
||||
<t t-if="widget.editable">
|
||||
<a
|
||||
role="menuitem"
|
||||
type="edit"
|
||||
class="dropdown-item"
|
||||
>Edit</a>
|
||||
</t>
|
||||
<t t-if="widget.deletable">
|
||||
<a
|
||||
role="menuitem"
|
||||
type="delete"
|
||||
class="dropdown-item"
|
||||
>Delete</a>
|
||||
</t>
|
||||
<!-- Color picker option: -->
|
||||
<!-- <ul class="oe_kanban_colorpicker" data-field="color"/>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_kanban_body">
|
||||
<!-- Content elements and fields go here... -->
|
||||
|
||||
<div style="font-size: 1.5em;">
|
||||
<field name="task_id" />
|
||||
</div>
|
||||
<div style="font-size: 1.1em;">
|
||||
<field name="room_id" />
|
||||
</div>
|
||||
|
||||
<div class="o_kanban_image float-right">
|
||||
|
||||
<t t-if="record.employee_id.raw_value">
|
||||
<img
|
||||
alt="Employee image"
|
||||
t-att-title="record.employee_id.value"
|
||||
t-att-alt="record.employee_id.value"
|
||||
t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)"
|
||||
width="40"
|
||||
height="40"
|
||||
class="oe_kanban_avatar"
|
||||
/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="oe_kanban_footer">
|
||||
<div class="oe_kanban_footer_left">
|
||||
<!-- Left hand footer... -->
|
||||
|
||||
<!-- <div style="font-size: 0.8em;">-->
|
||||
<!-- <field name="state"/>-->
|
||||
<!-- </div>-->
|
||||
<div style="font-size: 0.8em;">
|
||||
<field name="notes" />
|
||||
</div>
|
||||
<div>
|
||||
<!-- <field name="clean_type" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_right">
|
||||
<field name="state" widget="state_selection" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear" />
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_filter_housekeeping_rack" model="ir.ui.view">
|
||||
<field name="model">pms.housekeeping</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Housekeeping filters">
|
||||
<field name="employee_id" />
|
||||
<!-- <field name="room_id.floor_id" />-->
|
||||
<field name="task_id" />
|
||||
<!-- <filter name="filter_occupied" string="Occupied" domain="[('clean_status','=','occupied')]"/> -->
|
||||
|
||||
<searchpanel>
|
||||
<!-- <field-->
|
||||
<!-- name="room_id.floor_id"-->
|
||||
<!-- string="Floor"-->
|
||||
<!-- enable_counters="1"-->
|
||||
<!-- select="multi"-->
|
||||
<!-- icon="fa-hospital-o"-->
|
||||
<!-- />-->
|
||||
<field
|
||||
name="task_id"
|
||||
string="Task type"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-bath"
|
||||
/>
|
||||
<field
|
||||
name="employee_id"
|
||||
string="Employee"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-user"
|
||||
/>
|
||||
<field
|
||||
name="room_id"
|
||||
string="Room"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-bed"
|
||||
/>
|
||||
<!-- <field name="clean_status" string="Clean Type" enable_counters="1" select="multi"/> -->
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_house_keeping_view_form">
|
||||
<field name="name">Housekeeping</field>
|
||||
<field name="res_model">pms.housekeeping</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_house_keeping_view_today_form">
|
||||
<field name="name">Housekeeping</field>
|
||||
<field name="res_model">pms.housekeeping</field>
|
||||
<field name="domain">[('task_date', '=',(context_today().strftime('%Y-%m-%d')))]
|
||||
</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Housekeeping"
|
||||
id="menu_action_pms_house_keeping"
|
||||
sequence="17"
|
||||
parent="pms.pms_management_menu"
|
||||
/>
|
||||
<menuitem
|
||||
name="Room Rack"
|
||||
id="menu_action_pms_house_keeping_view_rack"
|
||||
action="pms-housekeeping.action_pms_room_rack_kanban"
|
||||
sequence="10"
|
||||
parent="pms-housekeeping.menu_action_pms_house_keeping"
|
||||
/>
|
||||
<menuitem
|
||||
name="Today Tasks"
|
||||
id="menu_action_pms_house_keeping_view_today_form"
|
||||
action="action_pms_house_keeping_view_today_form"
|
||||
sequence="20"
|
||||
parent="pms-housekeeping.menu_action_pms_house_keeping"
|
||||
/>
|
||||
<menuitem
|
||||
name="Tasks History"
|
||||
id="menu_action_pms_house_keeping_view_form"
|
||||
action="action_pms_house_keeping_view_form"
|
||||
sequence="30"
|
||||
parent="pms-housekeeping.menu_action_pms_house_keeping"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
15
pms_housekeeping/views/pms_reservation_view.xml
Normal file
15
pms_housekeeping/views/pms_reservation_view.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="inheit_pms_reservation_view_form" model="ir.ui.view">
|
||||
<field name="name">view.model.form</field>
|
||||
<field name="model">pms.reservation</field>
|
||||
<field name="inherit_id" ref="pms.pms_reservation_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='departure_hour']" position="after">
|
||||
<field name="dont_disturb" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
212
pms_housekeeping/views/pms_room_view.xml
Normal file
212
pms_housekeeping/views/pms_room_view.xml
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="inherit_pms_room_view_form" model="ir.ui.view">
|
||||
<field name="name">view.model.form</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="inherit_id" ref="pms.pms_room_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='information_pms_room']" position="inside">
|
||||
<group colspan="4" col="4">
|
||||
<field name="clean_status" string="Clean Status" />
|
||||
<!-- <field name="clean_type" string="Clean Type" attrs="{'readonly': True}" /> -->
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_room_rack_form" model="ir.ui.view">
|
||||
<field name="name">Room rack form view</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="40" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<form string="Property Room">
|
||||
<group col="4" colspan="4" name="header">
|
||||
<field
|
||||
name="name"
|
||||
readonly="1"
|
||||
nolabel="1"
|
||||
style="font-size: 2em;"
|
||||
/>
|
||||
<group col="1">
|
||||
<field name="clean_employee_id" />
|
||||
</group>
|
||||
<group col="1">
|
||||
<field
|
||||
name="employee_picture"
|
||||
widget="image"
|
||||
class="oe_left oe_avatar"
|
||||
nolabel="1"
|
||||
readonly="1"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="status" string="Clean type and status">
|
||||
<field
|
||||
name="clean_status"
|
||||
readonly="1"
|
||||
nolabel="1"
|
||||
style="font-size: 2em;"
|
||||
/>
|
||||
<!-- <group col="1">
|
||||
<field name="clean_status" />
|
||||
</group> -->
|
||||
</group>
|
||||
|
||||
<separator string="Task Lines" colspan="4" />
|
||||
|
||||
<field
|
||||
name="housekeeping_ids"
|
||||
readonly="0"
|
||||
context="{'default_state': 'to_do',
|
||||
'default_employee_id': clean_employee_id,
|
||||
'tree_view_ref':'view_pms_room_rack_tree',
|
||||
'form_view_ref':'view_pms_room_rack_form',
|
||||
'default_room_id': id}"
|
||||
/>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_room_rack_tree" model="ir.ui.view">
|
||||
<field name="name">Room rack tree view</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="20" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Property Room">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="capacity" />
|
||||
<field name="clean_status" />
|
||||
<field name="clean_employee_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_filter_room_rack" model="ir.ui.view">
|
||||
<field name="model">pms.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Housekeeping filters">
|
||||
<field name="clean_employee_id" />
|
||||
<field name="floor_id" />
|
||||
<field name="room_type_id" />
|
||||
<!-- <filter name="filter_occupied" string="Occupied" domain="[('clean_status','=','occupied')]"/> -->
|
||||
|
||||
<searchpanel>
|
||||
<field
|
||||
name="room_type_id"
|
||||
string="Room type"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-bed"
|
||||
/>
|
||||
<field
|
||||
name="clean_employee_id"
|
||||
string="Employee"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-user"
|
||||
/>
|
||||
<field
|
||||
name="floor_id"
|
||||
string="Floor"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
icon="fa-hospital-o"
|
||||
/>
|
||||
<!-- <field name="clean_status" string="Clean Type" enable_counters="1" select="multi"/> -->
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_room_rack_kanban" model="ir.ui.view">
|
||||
<field name="name">Room rack kanban view</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="active" eval="True" />
|
||||
<field name="arch" type="xml">
|
||||
<kanban
|
||||
default_group_by="floor_id"
|
||||
default_order="floor_id"
|
||||
class="o_res_partner_kanban"
|
||||
sample="1"
|
||||
group_create="false"
|
||||
create="false"
|
||||
>
|
||||
<field name="name" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click_edit">
|
||||
<div class="o_dropdown_kanban dropdown">
|
||||
<!-- Top-right drop down menu here... -->
|
||||
</div>
|
||||
<div class="oe_kanban_body">
|
||||
<!-- Content elements and fields go here... -->
|
||||
<div style="font-size: 1.5em;">
|
||||
<field name="name" />
|
||||
<!-- class="oe_stat_button" -->
|
||||
</div><div style="font-size: 1.1em;">
|
||||
<field name="clean_status" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="oe_kanban_footer">
|
||||
<div class="oe_kanban_footer_left">
|
||||
<!-- Left hand footer... -->
|
||||
<field
|
||||
name="housekeeping_ids"
|
||||
widget="many2many_tags"
|
||||
domain="[('state', '=', 'draft')]"
|
||||
/>
|
||||
Default: <field name="clean_employee_id" />
|
||||
<div>
|
||||
<!-- <field name="clean_type" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_right">
|
||||
<!-- Right hand footer... -->
|
||||
<a
|
||||
type="object"
|
||||
name="add_today_tasks"
|
||||
help="Add the housekeeping tasks"
|
||||
>
|
||||
<span
|
||||
class="fa fa-plus-square"
|
||||
title="Add all today tasks"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear" />
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_pms_room_rack_kanban">
|
||||
<field name="name">Housekeeping</field>
|
||||
<field name="res_model">pms.room</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('view_pms_room_rack_kanban')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_pms_room_rack_tree')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_pms_room_rack_form')})]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user