mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] pms_base
This commit is contained in:
@@ -20,11 +20,10 @@ jobs:
|
||||
include:
|
||||
- stage: test
|
||||
env:
|
||||
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1" OPTIONS="--load
|
||||
web,multi_pms_properties"
|
||||
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
|
||||
- stage: test
|
||||
env:
|
||||
- TESTS=1 ODOO_REPO="OCA/OCB" OPTIONS="--load web,multi_pms_properties"
|
||||
- TESTS=1 ODOO_REPO="OCA/OCB"
|
||||
env:
|
||||
global:
|
||||
- VERSION="14.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
|
||||
|
||||
109
pms_base/README.rst
Normal file
109
pms_base/README.rst
Normal file
@@ -0,0 +1,109 @@
|
||||
================================
|
||||
PMS (Property Management System)
|
||||
================================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Alpha
|
||||
.. |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
|
||||
: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
|
||||
: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 properties
|
||||
for managing every aspect of your property's daily operations.
|
||||
|
||||
You can manage properties with multi-property and multi-company support, including your rooms inventory,
|
||||
reservations, check-in, daily reports, board services, rate and availability plans among other property functionalities.
|
||||
|
||||
.. IMPORTANT::
|
||||
This is an alpha version, the data model and design can change at any time without warning.
|
||||
Only for development or testing purpose, do not use in production.
|
||||
`More details on development status <https://odoo-community.org/page/development-status>`_
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
This module depends on modules ``base``, ``mail``, ``sale`` and ``multi_pms_properties``.
|
||||
Ensure yourself to have all them in your addons list.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
You will find the hotel settings in PMS Management > Configuration > Properties > Your Property.
|
||||
|
||||
This module required additional configuration for company, accounting, invoicing and user privileges.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, please, read the complete user guide at `<roomdoo.com>`_.
|
||||
|
||||
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%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
|
||||
~~~~~~~
|
||||
|
||||
* Commit [Sun]
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Alexandre Díaz
|
||||
* Pablo Quesada
|
||||
* Jose Luis Algara
|
||||
* `Commit [Sun] <https://www.commitsun.com>`:
|
||||
|
||||
* Dario Lodeiros
|
||||
* Eric Antones
|
||||
* Sara Lago
|
||||
* Brais Abeijon
|
||||
* Miguel Padin
|
||||
|
||||
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>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
2
pms_base/__init__.py
Normal file
2
pms_base/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from . import models
|
||||
38
pms_base/__manifest__.py
Normal file
38
pms_base/__manifest__.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# Copyright 2019 Darío Lodeiros, Alexandre Díaz, Jose Luis Algara, Pablo Quesada
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Property Management System",
|
||||
"summary": "Manage properties",
|
||||
"version": "14.0.1.0.0",
|
||||
"development_status": "Alpha",
|
||||
"category": "Generic Modules/Property Management System",
|
||||
"website": "https://github.com/OCA/pms",
|
||||
"author": "Commit [Sun], Open Source Integrators, Odoo Community Association (OCA)",
|
||||
"maintainers": ["eantones"],
|
||||
"license": "AGPL-3",
|
||||
"application": True,
|
||||
"depends": ["base_geolocalize", "mail", "product"],
|
||||
"data": [
|
||||
"security/res_groups.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"security/ir_rule.xml",
|
||||
"data/pms_stage.xml",
|
||||
"data/pms_team.xml",
|
||||
"data/pms_amenity_type.xml",
|
||||
"data/pms_room_type.xml",
|
||||
"views/pms_tag.xml",
|
||||
"views/pms_stage.xml",
|
||||
"views/pms_amenity_type.xml",
|
||||
"views/pms_amenity.xml",
|
||||
"views/pms_room_type.xml",
|
||||
"views/pms_room.xml",
|
||||
"views/pms_service.xml",
|
||||
"views/pms_property.xml",
|
||||
"views/res_config_settings.xml",
|
||||
"views/pms_team.xml",
|
||||
"views/menu.xml",
|
||||
"views/res_partner_view.xml",
|
||||
],
|
||||
}
|
||||
27
pms_base/data/pms_amenity_type.xml
Normal file
27
pms_base/data/pms_amenity_type.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<odoo>
|
||||
|
||||
<record id="pms_amenity_type_0" model="pms.amenity.type">
|
||||
<field name="name">Toiletries</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_amenity_type_1" model="pms.amenity.type">
|
||||
<field name="name">Connectivity</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_amenity_type_2" model="pms.amenity.type">
|
||||
<field name="name">Kitchen facilities</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_amenity_type_3" model="pms.amenity.type">
|
||||
<field name="name">Laundry Room</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_amenity_type_4" model="pms.amenity.type">
|
||||
<field name="name">Parking Lot</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_amenity_type_5" model="pms.amenity.type">
|
||||
<field name="name">Pets</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
98
pms_base/data/pms_room_type.xml
Normal file
98
pms_base/data/pms_room_type.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<odoo>
|
||||
|
||||
<record id="pms_room_type_0" model="pms.room.type">
|
||||
<field name="name">Economic</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_1" model="pms.room.type">
|
||||
<field name="name">Single</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_2" model="pms.room.type">
|
||||
<field name="name">Double</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_3" model="pms.room.type">
|
||||
<field name="name">Triple</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_4" model="pms.room.type">
|
||||
<field name="name">Conference Room</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_bath" model="pms.room.type">
|
||||
<field name="name">Bathroom</field>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_bed" model="pms.room.type">
|
||||
<field name="name">Bedroom</field>
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_kitchen" model="pms.room.type">
|
||||
<field name="name">Kitchen</field>
|
||||
<field name="sequence">30</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_living" model="pms.room.type">
|
||||
<field name="name">Livingroom</field>
|
||||
<field name="sequence">40</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_dining" model="pms.room.type">
|
||||
<field name="name">Diningroom</field>
|
||||
<field name="sequence">50</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_play" model="pms.room.type">
|
||||
<field name="name">Playroom</field>
|
||||
<field name="sequence">60</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_patio" model="pms.room.type">
|
||||
<field name="name">Terrace/Patio</field>
|
||||
<field name="sequence">64</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_balcony" model="pms.room.type">
|
||||
<field name="name">Balcony</field>
|
||||
<field name="sequence">67</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_hall" model="pms.room.type">
|
||||
<field name="name">Hall</field>
|
||||
<field name="sequence">70</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_garage" model="pms.room.type">
|
||||
<field name="name">Garage</field>
|
||||
<field name="sequence">80</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_basement" model="pms.room.type">
|
||||
<field name="name">Basement</field>
|
||||
<field name="sequence">90</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_laundry" model="pms.room.type">
|
||||
<field name="name">Laundry Room</field>
|
||||
<field name="sequence">100</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_parking_lot" model="pms.room.type">
|
||||
<field name="name">Parking Lot</field>
|
||||
<field name="sequence">110</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_pets" model="pms.room.type">
|
||||
<field name="name">Pets</field>
|
||||
<field name="sequence">120</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_room_type_half_bath" model="pms.room.type">
|
||||
<field name="name">Half Bathroom</field>
|
||||
<field name="sequence">130</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
23
pms_base/data/pms_stage.xml
Normal file
23
pms_base/data/pms_stage.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<odoo>
|
||||
|
||||
<record id="pms_stage_new" model="pms.stage">
|
||||
<field name="name">New</field>
|
||||
<field name="sequence">10</field>
|
||||
<field name="is_default">True</field>
|
||||
<field name="stage_type">property</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_stage_available" model="pms.stage">
|
||||
<field name="name">Available</field>
|
||||
<field name="sequence">20</field>
|
||||
<field name="stage_type">property</field>
|
||||
</record>
|
||||
|
||||
<record id="pms_stage_cancelled" model="pms.stage">
|
||||
<field name="name">Cancelled</field>
|
||||
<field name="sequence">99</field>
|
||||
<field name="is_closed">True</field>
|
||||
<field name="stage_type">property</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
7
pms_base/data/pms_team.xml
Normal file
7
pms_base/data/pms_team.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="pms_team_default" model="pms.team">
|
||||
<field name="name">Default Team</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
1851
pms_base/i18n/es.po
Normal file
1851
pms_base/i18n/es.po
Normal file
File diff suppressed because it is too large
Load Diff
1847
pms_base/i18n/pms_base.pot
Normal file
1847
pms_base/i18n/pms_base.pot
Normal file
File diff suppressed because it is too large
Load Diff
19
pms_base/models/__init__.py
Normal file
19
pms_base/models/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 2018 Alexandre Díaz
|
||||
# Copyright 2018 Dario Lodeiros
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import (
|
||||
pms_stage,
|
||||
pms_tag,
|
||||
pms_team,
|
||||
pms_room_type,
|
||||
pms_amenity_type,
|
||||
pms_room,
|
||||
pms_amenity,
|
||||
pms_service,
|
||||
pms_property,
|
||||
res_company,
|
||||
res_config_settings,
|
||||
res_partner,
|
||||
)
|
||||
33
pms_base/models/pms_amenity.py
Normal file
33
pms_base/models/pms_amenity.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsAmenity(models.Model):
|
||||
_name = "pms.amenity"
|
||||
_description = "Property Amenity"
|
||||
|
||||
active = fields.Boolean(
|
||||
string="Active", help="Determines if amenity is active", default=True
|
||||
)
|
||||
name = fields.Char(
|
||||
string="Name", help="Name of the amenity", required=True, translate=True
|
||||
)
|
||||
property_ids = fields.Many2many(
|
||||
string="Properties",
|
||||
help="Properties with access to the amenity",
|
||||
comodel_name="pms.property",
|
||||
ondelete="restrict",
|
||||
relation="pms_property_amenity_rel",
|
||||
column1="amenity_id",
|
||||
column2="property_id",
|
||||
)
|
||||
type_id = fields.Many2one(
|
||||
string="Type",
|
||||
help="Organize amenities by type (multimedia, comfort, etc ...)",
|
||||
comodel_name="pms.amenity.type",
|
||||
)
|
||||
default_code = fields.Char(
|
||||
string="Internal Reference", help="Internal unique identifier of the amenity"
|
||||
)
|
||||
14
pms_base/models/pms_amenity_type.py
Normal file
14
pms_base/models/pms_amenity_type.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsRoomAmenityType(models.Model):
|
||||
_name = "pms.amenity.type"
|
||||
_description = "Amenity Type"
|
||||
|
||||
active = fields.Boolean(
|
||||
string="Active", help="Determines if amenity type is active", default=True
|
||||
)
|
||||
name = fields.Char(string="Name", required=True, translate=True)
|
||||
288
pms_base/models/pms_property.py
Normal file
288
pms_base/models/pms_property.py
Normal file
@@ -0,0 +1,288 @@
|
||||
# Copyright 2019 Pablo Quesada
|
||||
# Copyright 2019 Dario Lodeiros
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import api, fields, models
|
||||
|
||||
from odoo.addons.base.models.res_partner import _tz_get
|
||||
|
||||
|
||||
class PmsProperty(models.Model):
|
||||
_name = "pms.property"
|
||||
_description = "Property"
|
||||
_inherit = ["mail.thread", "mail.activity.mixin"]
|
||||
_inherits = {"res.partner": "partner_id"}
|
||||
|
||||
def _default_team_id(self):
|
||||
return self.env.ref("pms_base.pms_team_default", raise_if_not_found=False)
|
||||
|
||||
partner_id = fields.Many2one(
|
||||
string="Property",
|
||||
help="Current property",
|
||||
comodel_name="res.partner",
|
||||
required=True,
|
||||
ondelete="cascade",
|
||||
)
|
||||
owner_id = fields.Many2one(
|
||||
string="Owner",
|
||||
help="The owner of the property.",
|
||||
comodel_name="res.partner",
|
||||
required=True,
|
||||
)
|
||||
parent_id = fields.Many2one(string="Parent Property", comodel_name="pms.property")
|
||||
property_child_ids = fields.One2many(
|
||||
"pms.property", "parent_id", string="Children Property"
|
||||
)
|
||||
company_id = fields.Many2one(string="Company", comodel_name="res.company")
|
||||
team_id = fields.Many2one(
|
||||
"pms.team", string="Team", default=lambda self: self._default_team_id()
|
||||
)
|
||||
room_ids = fields.One2many(
|
||||
string="Rooms",
|
||||
help="List of rooms in the property.",
|
||||
comodel_name="pms.room",
|
||||
inverse_name="property_id",
|
||||
)
|
||||
room_count = fields.Integer(string="Number of rooms", compute="_compute_room_count")
|
||||
amenity_ids = fields.Many2many(
|
||||
string="Amenities",
|
||||
help="Amenities available in this property",
|
||||
comodel_name="pms.amenity",
|
||||
ondelete="restrict",
|
||||
relation="pms_property_amenity_rel",
|
||||
column1="property_id",
|
||||
column2="amenity_id",
|
||||
)
|
||||
service_ids = fields.One2many(
|
||||
string="Services",
|
||||
help="List of services available in the property.",
|
||||
comodel_name="pms.service",
|
||||
inverse_name="property_id",
|
||||
)
|
||||
tag_ids = fields.Many2many(
|
||||
string="Tags",
|
||||
comodel_name="pms.tag",
|
||||
relation="pms_property_tag_rel",
|
||||
column1="property_id",
|
||||
column2="tag_id",
|
||||
)
|
||||
tz = fields.Selection(
|
||||
string="Timezone",
|
||||
help="This field is used to determine the timezone of the property.",
|
||||
required=True,
|
||||
default=lambda self: self.env.user.tz or "UTC",
|
||||
selection=_tz_get,
|
||||
)
|
||||
area = fields.Float(string="Area")
|
||||
heating = fields.Selection(
|
||||
string="Heating",
|
||||
selection=[
|
||||
("tankless_gas", "Gas (Tankless)"),
|
||||
("boiler_gas", "Gas Boiler"),
|
||||
("tankless_electric", "Electric (Tankless)"),
|
||||
("boiler_electric", "Electric Boiler"),
|
||||
("boiler_building", "Building Boiler"),
|
||||
],
|
||||
)
|
||||
childs_property_count = fields.Integer(
|
||||
"Children Count", compute="_compute_childs_property"
|
||||
)
|
||||
floors_num = fields.Integer(string="Floor")
|
||||
unit_floor = fields.Integer(string="Unit Floor")
|
||||
balcony = fields.Boolean(string="Balcony", compute="_compute_balcony", store=True)
|
||||
laundry_room = fields.Boolean(
|
||||
string="Laundry Room", compute="_compute_laundry_room", store=True
|
||||
)
|
||||
parking_lot = fields.Boolean(
|
||||
string="Parking Lot", compute="_compute_parking_lot", store=True
|
||||
)
|
||||
pets = fields.Boolean(string="Pets", compute="_compute_pets", store=True)
|
||||
terrace = fields.Boolean(string="Terrace", compute="_compute_terrace", store=True)
|
||||
qty_half_bathroom = fields.Integer(
|
||||
string="Qty Half Bathroom", compute="_compute_qty_half_bathroom", store=True
|
||||
)
|
||||
qty_living_room = fields.Integer(
|
||||
string="Qty Living Room", compute="_compute_qty_living_room", store=True
|
||||
)
|
||||
qty_dining_room = fields.Integer(
|
||||
string="Qty Dining Room", compute="_compute_qty_dining_room", store=True
|
||||
)
|
||||
qty_kitchen = fields.Integer(
|
||||
string="Qty Kitchen", compute="_compute_qty_kitchen", store=True
|
||||
)
|
||||
qty_bedroom = fields.Integer(
|
||||
string="Qty Bedroom", compute="_compute_qty_bedroom", store=True
|
||||
)
|
||||
|
||||
@api.depends("property_child_ids")
|
||||
def _compute_childs_property(self):
|
||||
for rec in self:
|
||||
rec.childs_property_count = len(rec.property_child_ids)
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_room_count(self):
|
||||
for rec in self:
|
||||
rec.room_count = len(rec.room_ids)
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_balcony(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_balcony", raise_if_not_found=False
|
||||
)
|
||||
balcony = len(rec.room_ids.filtered(lambda x: x.type_id == type_id))
|
||||
if balcony:
|
||||
rec.balcony = True
|
||||
else:
|
||||
rec.balcony = False
|
||||
|
||||
@api.depends("room_ids", "amenity_ids")
|
||||
def _compute_laundry_room(self):
|
||||
for rec in self:
|
||||
room_type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_laundry", raise_if_not_found=False
|
||||
)
|
||||
amenity_type_id = self.env.ref(
|
||||
"pms_base.pms_amenity_type_3", raise_if_not_found=False
|
||||
)
|
||||
room_count_laundry = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == room_type_id)
|
||||
)
|
||||
amenity_count_laundry = len(
|
||||
rec.amenity_ids.filtered(lambda x: x.type_id == amenity_type_id)
|
||||
)
|
||||
if room_count_laundry or amenity_count_laundry:
|
||||
rec.laundry_room = True
|
||||
else:
|
||||
rec.laundry_room = False
|
||||
|
||||
@api.depends("room_ids", "amenity_ids")
|
||||
def _compute_parking_lot(self):
|
||||
for rec in self:
|
||||
room_type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_parking_lot", raise_if_not_found=False
|
||||
)
|
||||
amenity_type_id = self.env.ref(
|
||||
"pms_base.pms_amenity_type_4", raise_if_not_found=False
|
||||
)
|
||||
room_count_parking = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == room_type_id)
|
||||
)
|
||||
amenity_count_parking = len(
|
||||
rec.amenity_ids.filtered(lambda x: x.type_id == amenity_type_id)
|
||||
)
|
||||
if room_count_parking or amenity_count_parking:
|
||||
rec.parking_lot = True
|
||||
else:
|
||||
rec.parking_lot = False
|
||||
|
||||
@api.depends("room_ids", "amenity_ids")
|
||||
def _compute_pets(self):
|
||||
for rec in self:
|
||||
room_type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_pets", raise_if_not_found=False
|
||||
)
|
||||
amenity_type_id = self.env.ref(
|
||||
"pms_base.pms_amenity_type_5", raise_if_not_found=False
|
||||
)
|
||||
room_count_pets = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == room_type_id)
|
||||
)
|
||||
amenity_count_pets = len(
|
||||
rec.amenity_ids.filtered(lambda x: x.type_id == amenity_type_id)
|
||||
)
|
||||
if room_count_pets or amenity_count_pets:
|
||||
rec.pets = True
|
||||
else:
|
||||
rec.pets = False
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_terrace(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_patio", raise_if_not_found=False
|
||||
)
|
||||
terrace = len(rec.room_ids.filtered(lambda x: x.type_id == type_id))
|
||||
if terrace:
|
||||
rec.terrace = True
|
||||
else:
|
||||
rec.terrace = False
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_qty_half_bathroom(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_half_bath", raise_if_not_found=False
|
||||
)
|
||||
rec.qty_half_bathroom = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == type_id)
|
||||
)
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_qty_living_room(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_living", raise_if_not_found=False
|
||||
)
|
||||
rec.qty_living_room = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == type_id)
|
||||
)
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_qty_dining_room(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_dining", raise_if_not_found=False
|
||||
)
|
||||
rec.qty_dining_room = len(
|
||||
rec.room_ids.filtered(lambda x: x.type_id == type_id)
|
||||
)
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_qty_kitchen(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_kitchen", raise_if_not_found=False
|
||||
)
|
||||
rec.qty_kitchen = len(rec.room_ids.filtered(lambda x: x.type_id == type_id))
|
||||
|
||||
@api.depends("room_ids")
|
||||
def _compute_qty_bedroom(self):
|
||||
for rec in self:
|
||||
type_id = self.env.ref(
|
||||
"pms_base.pms_room_type_bed", raise_if_not_found=False
|
||||
)
|
||||
rec.qty_bedroom = len(rec.room_ids.filtered(lambda x: x.type_id == type_id))
|
||||
|
||||
def action_view_childs_property_list(self):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"pms_base.action_pms_property"
|
||||
)
|
||||
action["domain"] = [("id", "in", self.property_child_ids.ids)]
|
||||
return action
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
vals.update({"is_property": True})
|
||||
return super(PmsProperty, self).create(vals)
|
||||
|
||||
def name_get(self):
|
||||
# Prefetch the fields used by the `name_get`, so `browse` doesn't fetch other fields
|
||||
self.browse(self.ids).read(["name", "ref"])
|
||||
return [
|
||||
(
|
||||
property.id,
|
||||
"%s%s" % (property.ref and "[%s] " % property.ref or "", property.name),
|
||||
)
|
||||
for property in self
|
||||
]
|
||||
|
||||
@api.model
|
||||
def _name_search(
|
||||
self, name, args=None, operator="ilike", limit=100, name_get_uid=None
|
||||
):
|
||||
args = args or []
|
||||
domain = []
|
||||
if name:
|
||||
domain = ["|", ("name", operator, name), ("ref", operator, name)]
|
||||
return self._search(domain + args, limit=limit, access_rights_uid=name_get_uid)
|
||||
47
pms_base/models/pms_room.py
Normal file
47
pms_base/models/pms_room.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright 2018 Pablo Quesada
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsRoom(models.Model):
|
||||
_name = "pms.room"
|
||||
_description = "Property Room"
|
||||
_order = "sequence, type_id, name"
|
||||
|
||||
name = fields.Char(string="Room Name", help="Room Name", required=True)
|
||||
active = fields.Boolean(
|
||||
string="Active", help="Determines if room is active", default=True
|
||||
)
|
||||
sequence = fields.Integer(
|
||||
string="Sequence",
|
||||
help="Field used to change the position of the rooms in tree view."
|
||||
"Changing the position changes the sequence",
|
||||
default=0,
|
||||
)
|
||||
property_id = fields.Many2one(
|
||||
string="Property",
|
||||
required=True,
|
||||
comodel_name="pms.property",
|
||||
ondelete="restrict",
|
||||
)
|
||||
type_id = fields.Many2one(
|
||||
string="Room Type",
|
||||
help="Unique room type for the rooms",
|
||||
required=True,
|
||||
comodel_name="pms.room.type",
|
||||
ondelete="restrict",
|
||||
)
|
||||
capacity = fields.Integer(
|
||||
string="Capacity", help="The maximum number of people that can occupy a room"
|
||||
)
|
||||
area = fields.Float(string="Area")
|
||||
_sql_constraints = [
|
||||
(
|
||||
"room_property_unique",
|
||||
"unique(name, property_id)",
|
||||
"You cannot have more 2 rooms with the same name in the same property.",
|
||||
)
|
||||
]
|
||||
17
pms_base/models/pms_room_type.py
Normal file
17
pms_base/models/pms_room_type.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright 2021 Eric Antones <eantones@nuobit.com>
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsRoomType(models.Model):
|
||||
_name = "pms.room.type"
|
||||
_description = "Room Type"
|
||||
|
||||
name = fields.Char(string="Name", required=True, translate=True)
|
||||
sequence = fields.Integer(string="Sequence", default=0)
|
||||
icon = fields.Char(
|
||||
string="Website Icon", help="Set Icon name from https://fontawesome.com/"
|
||||
)
|
||||
41
pms_base/models/pms_service.py
Normal file
41
pms_base/models/pms_service.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright 2018 Pablo Quesada
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsService(models.Model):
|
||||
_name = "pms.service"
|
||||
_description = "Property Service"
|
||||
|
||||
name = fields.Many2one(
|
||||
string="Service",
|
||||
help="Service",
|
||||
required=True,
|
||||
comodel_name="product.product",
|
||||
ondelete="restrict",
|
||||
domain="[('type', '=', 'service')]",
|
||||
)
|
||||
active = fields.Boolean(
|
||||
string="Active", help="Determines if service is active", default=True
|
||||
)
|
||||
sequence = fields.Integer(
|
||||
string="Sequence",
|
||||
help="Field used to change the position of the rooms in tree view."
|
||||
"Changing the position changes the sequence",
|
||||
default=0,
|
||||
)
|
||||
property_id = fields.Many2one(
|
||||
string="Property",
|
||||
required=True,
|
||||
comodel_name="pms.property",
|
||||
ondelete="restrict",
|
||||
)
|
||||
vendor_id = fields.Many2one(
|
||||
string="Vendor", required=True, comodel_name="res.partner", ondelete="restrict"
|
||||
)
|
||||
icon = fields.Char(
|
||||
string="Website Icon", help="Set Icon name from https://fontawesome.com/"
|
||||
)
|
||||
51
pms_base/models/pms_stage.py
Normal file
51
pms_base/models/pms_stage.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class PMSStage(models.Model):
|
||||
_name = "pms.stage"
|
||||
_description = "PMS Stage"
|
||||
_order = "sequence, name, id"
|
||||
|
||||
def _default_team_ids(self):
|
||||
default_team_id = self.env.context.get("default_team_id")
|
||||
return [default_team_id] if default_team_id else None
|
||||
|
||||
name = fields.Char(string="Name", required=True, translate=True)
|
||||
sequence = fields.Integer("Sequence", default=1)
|
||||
fold = fields.Boolean(
|
||||
"Folded in Kanban",
|
||||
help="This stage is folded in the kanban view when "
|
||||
"there are no record in that stage to display.",
|
||||
)
|
||||
is_closed = fields.Boolean(
|
||||
"Is a close stage", help="Services in this stage are considered " "as closed."
|
||||
)
|
||||
is_default = fields.Boolean("Is a default stage", help="Used as default stage")
|
||||
description = fields.Text(translate=True)
|
||||
company_id = fields.Many2one(
|
||||
"res.company",
|
||||
string="Company",
|
||||
required=False,
|
||||
index=True,
|
||||
default=lambda self: self.env.user.company_id,
|
||||
)
|
||||
team_ids = fields.Many2many(
|
||||
"pms.team", string="Teams", default=lambda self: self._default_team_ids()
|
||||
)
|
||||
stage_type = fields.Selection([("property", "Property")], "Type", required=True)
|
||||
custom_color = fields.Char(
|
||||
"Color Code", default="#FFFFFF", help="Use Hex Code only Ex:-#FFFFFF"
|
||||
)
|
||||
active = fields.Boolean(string="Active", default=True)
|
||||
|
||||
@api.constrains("custom_color")
|
||||
def _check_custom_color_hex_code(self):
|
||||
if (
|
||||
self.custom_color
|
||||
and not self.custom_color.startswith("#")
|
||||
or len(self.custom_color) != 7
|
||||
):
|
||||
raise ValidationError(_("Color code should be Hex Code. Ex:-#FFFFFF"))
|
||||
33
pms_base/models/pms_tag.py
Normal file
33
pms_base/models/pms_tag.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright 2021 Eric Antones <eantones@nuobit.com>
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PmsTag(models.Model):
|
||||
_name = "pms.tag"
|
||||
_description = "PMS Tag"
|
||||
|
||||
name = fields.Char(string="Name", required=True, translate=True)
|
||||
parent_id = fields.Many2one("pms.tag", string="Parent")
|
||||
color = fields.Integer("Color Index", default=10)
|
||||
full_name = fields.Char(string="Full Name", compute="_compute_full_name")
|
||||
company_id = fields.Many2one(
|
||||
"res.company",
|
||||
string="Company",
|
||||
required=True,
|
||||
index=True,
|
||||
default=lambda self: self.env.user.company_id,
|
||||
help="Company related to this tag",
|
||||
)
|
||||
|
||||
_sql_constraints = [("name_uniq", "unique (name)", "Tag name already exists!")]
|
||||
|
||||
def _compute_full_name(self):
|
||||
for record in self:
|
||||
if record.parent_id:
|
||||
record.full_name = record.parent_id.name + "/" + record.name
|
||||
else:
|
||||
record.full_name = record.name
|
||||
41
pms_base/models/pms_team.py
Normal file
41
pms_base/models/pms_team.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PMSTeam(models.Model):
|
||||
_name = "pms.team"
|
||||
_description = "PMS Team"
|
||||
_inherit = ["mail.thread", "mail.activity.mixin"]
|
||||
|
||||
def _default_stages(self):
|
||||
return self.env["pms.stage"].search([("is_default", "=", True)])
|
||||
|
||||
def _compute_property_count(self):
|
||||
property_count = 0
|
||||
property_obj = self.env["pms.property"]
|
||||
for rec in self:
|
||||
property_count = property_obj.search_count([("team_id", "=", rec.id)])
|
||||
rec.property_count = property_count
|
||||
|
||||
name = fields.Char(required=True, translate=True)
|
||||
description = fields.Text(translate=True)
|
||||
color = fields.Integer("Color Index")
|
||||
stage_ids = fields.Many2many("pms.stage", string="Stages", default=_default_stages)
|
||||
property_ids = fields.One2many("pms.property", "team_id", string="Properties")
|
||||
property_count = fields.Integer(
|
||||
compute="_compute_property_count", string="Properties Count"
|
||||
)
|
||||
sequence = fields.Integer(
|
||||
"Sequence", default=1, help="Used to sort teams. Lower is better."
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
"res.company",
|
||||
string="Company",
|
||||
required=False,
|
||||
index=True,
|
||||
default=lambda self: self.env.user.company_id,
|
||||
help="Company related to this team",
|
||||
)
|
||||
|
||||
_sql_constraints = [("name_uniq", "unique (name)", "Team name already exists!")]
|
||||
15
pms_base/models/res_company.py
Normal file
15
pms_base/models/res_company.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
pms_uom = fields.Selection(
|
||||
[("ft", "Square Foot"), ("m", "Square Meter")],
|
||||
string="Unit of Measure",
|
||||
default="m",
|
||||
)
|
||||
39
pms_base/models/res_config_settings.py
Normal file
39
pms_base/models/res_config_settings.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
# Groups
|
||||
group_pms_show_amenity = fields.Boolean(
|
||||
string="Show Amenities", implied_group="pms_base.group_pms_show_amenity"
|
||||
)
|
||||
group_pms_show_room = fields.Boolean(
|
||||
string="Show Rooms", implied_group="pms_base.group_pms_show_room"
|
||||
)
|
||||
group_pms_show_service = fields.Boolean(
|
||||
string="Show Services", implied_group="pms_base.group_pms_show_service"
|
||||
)
|
||||
group_pms_show_team = fields.Boolean(
|
||||
string="Show Teams", implied_group="pms_base.group_pms_show_team"
|
||||
)
|
||||
|
||||
# Modules
|
||||
module_pms_account = fields.Boolean(string="Manage Accounting")
|
||||
module_pms_account_asset = fields.Boolean(string="Manage Assets")
|
||||
module_pms_contract = fields.Boolean(string="Manage Contracts")
|
||||
module_pms_crm = fields.Boolean(string="Link a property to a lead")
|
||||
module_pms_sale = fields.Boolean(string="Manage Reservations")
|
||||
module_pms_website = fields.Boolean(string="Publish properties")
|
||||
module_pms_website_sale = fields.Boolean(string="Allow online booking")
|
||||
module_connector_guesty = fields.Boolean(string="Connect with Guesty")
|
||||
module_connector_wubook = fields.Boolean(string="Connect with Wubook")
|
||||
|
||||
# Companies
|
||||
pms_uom = fields.Selection(
|
||||
string="Unit of Measure", related="company_id.pms_uom", readonly=False
|
||||
)
|
||||
9
pms_base/models/res_partner.py
Normal file
9
pms_base/models/res_partner.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2021 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
is_property = fields.Boolean(string="Is a Property")
|
||||
1
pms_base/readme/CONFIGURE.rst
Normal file
1
pms_base/readme/CONFIGURE.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Go to Properties > Configuration > Settings.
|
||||
14
pms_base/readme/CONTRIBUTORS.rst
Normal file
14
pms_base/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,14 @@
|
||||
* Alexandre Díaz
|
||||
* Pablo Quesada
|
||||
* Jose Luis Algara
|
||||
* `Commit [Sun] <https://www.commitsun.com>`:
|
||||
|
||||
* Dario Lodeiros
|
||||
* Eric Antones
|
||||
* Sara Lago
|
||||
* Brais Abeijon
|
||||
* Miguel Padin
|
||||
|
||||
* `Open Source Integrators <https://www.opensourceintegrators.com>`:
|
||||
|
||||
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
|
||||
3
pms_base/readme/DESCRIPTION.rst
Normal file
3
pms_base/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
This module is the base module for the property management system (PMS) modules.
|
||||
|
||||
It provides the "Properties" apps with menu, settings, groups and data.
|
||||
1
pms_base/readme/USAGE.rst
Normal file
1
pms_base/readme/USAGE.rst
Normal file
@@ -0,0 +1 @@
|
||||
To use this module, please read the complete user guide at `<roomdoo.com>`_.
|
||||
20
pms_base/security/ir.model.access.csv
Normal file
20
pms_base/security/ir.model.access.csv
Normal file
@@ -0,0 +1,20 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_pms_amenity_user,access_pms_amenity_user,model_pms_amenity,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_amenity_type_user,access_pms_amenity_type_user,model_pms_amenity_type,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_room_user,access_pms_room_user,model_pms_room,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_tag_user,access_pms_tag_user,model_pms_tag,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_room_type_user,access_pms_room_type_user,model_pms_room_type,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_service_user,access_pms_service_user,model_pms_service,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_stage_use,access_pms_stage,model_pms_stage,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_team_user,access_pms_team,model_pms_team,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_property_user,access_property_user,model_pms_property,pms_base.group_pms_user,1,0,0,0
|
||||
access_pms_amenity_manager,access_pms_amenity_manager,model_pms_amenity,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_amenity_type_manager,access_pms_amenity_type_manager,model_pms_amenity_type,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_room_manager,access_pms_room_manager,model_pms_room,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_room_type_manager,access_pms_room_type_manager,model_pms_room_type,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_service_manager,access_pms_service_manager,model_pms_service,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_tag_manager,access_pms_tag_manager,model_pms_tag,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_stage_manager,access_pms_stage,model_pms_stage,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_team_manager,access_pms_team,model_pms_team,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_property_manager,access_property_manager,model_pms_property,pms_base.group_pms_manager,1,1,1,1
|
||||
access_pms_stage_group_user,access_pms_stage_group_user,model_pms_stage,base.group_user,1,0,0,0
|
||||
|
13
pms_base/security/ir_rule.xml
Normal file
13
pms_base/security/ir_rule.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Multi-Company Rule -->
|
||||
<record id="pms_property_rule" model="ir.rule">
|
||||
<field name="name">Multi-Company Property Rule</field>
|
||||
<field name="model_id" ref="model_pms_property" />
|
||||
<field name="global" eval="True" />
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
38
pms_base/security/res_groups.xml
Normal file
38
pms_base/security/res_groups.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<odoo noupdate="0">
|
||||
|
||||
<!-- Group for pms user -->
|
||||
<record id="group_pms_user" model="res.groups">
|
||||
<field name="name">Property Management / User</field>
|
||||
</record>
|
||||
|
||||
<!-- Group for pms manager -->
|
||||
<record id="group_pms_manager" model="res.groups">
|
||||
<field name="name">Property Management/ Manager</field>
|
||||
<field name="implied_ids" eval="[(4, ref('pms_base.group_pms_user'))]" />
|
||||
<field
|
||||
name="users"
|
||||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<!-- Group to show amenities -->
|
||||
<record id="group_pms_show_amenity" model="res.groups">
|
||||
<field name="name">Show Amenities</field>
|
||||
</record>
|
||||
|
||||
<!-- Group to show rooms -->
|
||||
<record id="group_pms_show_room" model="res.groups">
|
||||
<field name="name">Show Rooms</field>
|
||||
</record>
|
||||
|
||||
<!-- Group to show services -->
|
||||
<record id="group_pms_show_service" model="res.groups">
|
||||
<field name="name">Show Services</field>
|
||||
</record>
|
||||
|
||||
<!-- Group to show teams -->
|
||||
<record id="group_pms_show_team" model="res.groups">
|
||||
<field name="name">Show Teams</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
BIN
pms_base/static/description/icon.png
Normal file
BIN
pms_base/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
455
pms_base/static/description/index.html
Normal file
455
pms_base/static/description/index.html
Normal file
@@ -0,0 +1,455 @@
|
||||
<?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>PMS (Property Management System)</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="pms-property-management-system">
|
||||
<h1 class="title">PMS (Property Management System)</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="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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"><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"><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 properties
|
||||
for managing every aspect of your property’s daily operations.</p>
|
||||
<p>You can manage properties with multi-property and multi-company support, including your rooms inventory,
|
||||
reservations, check-in, daily reports, board services, rate and availability plans among other property functionalities.</p>
|
||||
<div class="admonition important">
|
||||
<p class="first admonition-title">Important</p>
|
||||
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
|
||||
Only for development or testing purpose, do not use in production.
|
||||
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
|
||||
</div>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
|
||||
<li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="installation">
|
||||
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
|
||||
<p>This module depends on modules <tt class="docutils literal">base</tt>, <tt class="docutils literal">mail</tt>, <tt class="docutils literal">sale</tt> and <tt class="docutils literal">multi_pms_properties</tt>.
|
||||
Ensure yourself to have all them in your addons list.</p>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id2">Configuration</a></h1>
|
||||
<p>You will find the hotel settings in PMS Management > Configuration > Properties > Your Property.</p>
|
||||
<p>This module required additional configuration for company, accounting, invoicing and user privileges.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
|
||||
<p>To use this module, please, read the complete user guide at <a class="reference external" href="roomdoo.com">roomdoo.com</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id4">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%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="#id5">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Commit [Sun]</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Alexandre Díaz</li>
|
||||
<li>Pablo Quesada</li>
|
||||
<li>Jose Luis Algara</li>
|
||||
<li><cite>Commit [Sun] <https://www.commitsun.com></cite>:<ul>
|
||||
<li>Dario Lodeiros</li>
|
||||
<li>Eric Antones</li>
|
||||
<li>Sara Lago</li>
|
||||
<li>Brais Abeijon</li>
|
||||
<li>Miguel Padin</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id8">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">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>
|
||||
152
pms_base/views/menu.xml
Normal file
152
pms_base/views/menu.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Menu Items -->
|
||||
<menuitem
|
||||
id="menu_root"
|
||||
name="Properties"
|
||||
sequence="20"
|
||||
groups="pms_base.group_pms_user"
|
||||
web_icon="pms_base,static/description/icon.png"
|
||||
/>
|
||||
|
||||
<!-- Master Dashboard Menu -->
|
||||
<menuitem
|
||||
id="menu_board"
|
||||
name="Dashboard"
|
||||
parent="pms_base.menu_root"
|
||||
sequence="10"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_board_pms_team"
|
||||
name="Teams"
|
||||
action="pms_base.action_pms_team"
|
||||
parent="pms_base.menu_board"
|
||||
sequence="10"
|
||||
/>
|
||||
|
||||
<!-- Master Operations Menu -->
|
||||
<menuitem
|
||||
id="menu_operations"
|
||||
name="Operations"
|
||||
parent="pms_base.menu_root"
|
||||
sequence="20"
|
||||
/>
|
||||
|
||||
<!-- Master Data Menu -->
|
||||
<menuitem
|
||||
id="menu_data"
|
||||
name="Master Data"
|
||||
parent="pms_base.menu_root"
|
||||
sequence="30"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_data_property"
|
||||
name="Properties"
|
||||
parent="pms_base.menu_data"
|
||||
sequence="10"
|
||||
action="action_pms_property"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_data_room"
|
||||
name="Rooms"
|
||||
parent="pms_base.menu_data"
|
||||
sequence="20"
|
||||
action="action_pms_room"
|
||||
groups="pms_base.group_pms_show_room"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_data_amenity"
|
||||
name="Amenities"
|
||||
parent="pms_base.menu_data"
|
||||
sequence="30"
|
||||
action="action_pms_amenity"
|
||||
groups="pms_base.group_pms_show_amenity"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_data_service"
|
||||
name="Services"
|
||||
parent="pms_base.menu_data"
|
||||
sequence="40"
|
||||
action="action_pms_service"
|
||||
groups="pms_base.group_pms_show_service"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_data_product"
|
||||
name="Products"
|
||||
parent="pms_base.menu_data"
|
||||
sequence="50"
|
||||
action="product.product_template_action"
|
||||
groups="pms_base.group_pms_show_service"
|
||||
/>
|
||||
|
||||
<!-- Reporting Menu -->
|
||||
<menuitem
|
||||
id="menu_report"
|
||||
name="Reporting"
|
||||
parent="pms_base.menu_root"
|
||||
sequence="50"
|
||||
groups="pms_base.group_pms_manager"
|
||||
/>
|
||||
|
||||
<!-- Configuration Menu -->
|
||||
<menuitem
|
||||
id="menu_config"
|
||||
name="Configuration"
|
||||
parent="pms_base.menu_root"
|
||||
sequence="90"
|
||||
groups="pms_base.group_pms_manager"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_config_settings"
|
||||
name="Settings"
|
||||
parent="pms_base.menu_config"
|
||||
sequence="0"
|
||||
action="action_pms_config"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_config_stage"
|
||||
name="Stages"
|
||||
parent="pms_base.menu_config"
|
||||
sequence="3"
|
||||
action="action_pms_stage"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_config_tag"
|
||||
name="Tags"
|
||||
parent="pms_base.menu_config"
|
||||
sequence="5"
|
||||
action="action_pms_tag"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_config_team"
|
||||
name="Teams"
|
||||
parent="pms_base.menu_config"
|
||||
sequence="8"
|
||||
action="action_pms_team"
|
||||
groups="pms_base.group_pms_show_team"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_config_property"
|
||||
name="Properties"
|
||||
parent="pms_base.menu_config"
|
||||
sequence="10"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_config_property_room_type"
|
||||
name="Room Types"
|
||||
parent="pms_base.menu_config_property"
|
||||
sequence="10"
|
||||
action="action_pms_room_type"
|
||||
groups="pms_base.group_pms_show_room"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_pms_config_property_amenity_type"
|
||||
name="Amenity Types"
|
||||
parent="pms_base.menu_config_property"
|
||||
sequence="20"
|
||||
action="action_pms_amenity_type"
|
||||
groups="pms_base.group_pms_show_amenity"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
66
pms_base/views/pms_amenity.xml
Normal file
66
pms_base/views/pms_amenity.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_pms_amenity_form" model="ir.ui.view">
|
||||
<field name="name">pms.amenity.form</field>
|
||||
<field name="model">pms.amenity</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Amenities">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<h1>
|
||||
<label for="name" string="Amenity" />
|
||||
<field name="name" select="1" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="type_id" string="Type" />
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="default_code" select="1" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Properties">
|
||||
<field
|
||||
name="property_ids"
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_amenity_search">
|
||||
<field name="name">pms.amenity.search</field>
|
||||
<field name="model">pms.amenity</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Amenities">
|
||||
<field name="name" />
|
||||
<field name="type_id" select="1" />
|
||||
<group expand="0" string="Group By..." />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="pms_amenity_view_tree">
|
||||
<field name="name">pms.amenity.tree</field>
|
||||
<field name="model">pms.amenity</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Amenities">
|
||||
<field name="default_code" />
|
||||
<field name="name" />
|
||||
<field name="type_id" select="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_amenity">
|
||||
<field name="name">Amenities</field>
|
||||
<field name="res_model">pms.amenity</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
44
pms_base/views/pms_amenity_type.xml
Normal file
44
pms_base/views/pms_amenity_type.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<odoo>
|
||||
<!--==== Amenities Type ==== -->
|
||||
<!-- Form view of pms room amenities type -->
|
||||
<record model="ir.ui.view" id="view_pms_room_amenity_type_form">
|
||||
<field name="name">pms.amenity.type.form</field>
|
||||
<field name="model">pms.amenity.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Amenity Type">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left" />
|
||||
<group id="main-right" />
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of pms room amenities type -->
|
||||
<record model="ir.ui.view" id="view_pms_amenity_type_tree">
|
||||
<field name="name">pms.amenity.type.tree</field>
|
||||
<field name="model">pms.amenity.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Amenity Types">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for pms room amenities type -->
|
||||
<record model="ir.actions.act_window" id="action_pms_amenity_type">
|
||||
<field name="name">Amenity Types</field>
|
||||
<field name="res_model">pms.amenity.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
311
pms_base/views/pms_property.xml
Normal file
311
pms_base/views/pms_property.xml
Normal file
@@ -0,0 +1,311 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_pms_property_form" model="ir.ui.view">
|
||||
<field name="name">pms.property.form</field>
|
||||
<field name="model">pms.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Property">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_view_childs_property_list"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-users"
|
||||
attrs="{'invisible': [('childs_property_count', '=', 0)]}"
|
||||
>
|
||||
<field
|
||||
name="childs_property_count"
|
||||
widget="statinfo"
|
||||
string="Child Property"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<field
|
||||
name="image_1920"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'preview_image': 'image_128'}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
<field name="id" invisible="True" />
|
||||
</h1>
|
||||
<field name="ref" placeholder="Reference" />
|
||||
</div>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<label for="street" string="Address" />
|
||||
<div class="o_address_format">
|
||||
<field
|
||||
name="street"
|
||||
placeholder="Street..."
|
||||
class="o_address_street"
|
||||
/>
|
||||
<field
|
||||
name="street2"
|
||||
placeholder="Street 2..."
|
||||
class="o_address_street"
|
||||
/>
|
||||
<field
|
||||
name="city"
|
||||
placeholder="City"
|
||||
class="o_address_city"
|
||||
/>
|
||||
<field
|
||||
name="state_id"
|
||||
class="o_address_state"
|
||||
placeholder="State"
|
||||
options="{"no_open": True}"
|
||||
context="{'country_id': country_id, 'zip': zip}"
|
||||
/>
|
||||
<field
|
||||
name="zip"
|
||||
placeholder="ZIP"
|
||||
class="o_address_zip"
|
||||
/>
|
||||
<field
|
||||
name="country_id"
|
||||
placeholder="Country"
|
||||
class="o_address_country"
|
||||
options="{"no_open": True, "no_create": True}"
|
||||
/>
|
||||
</div>
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="parent_id" domain="[('id', '!=', id)]" />
|
||||
<field name="tz" />
|
||||
<field
|
||||
name="owner_id"
|
||||
domain="[('is_property', '=', False)]"
|
||||
/>
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
<field name="team_id" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Information" name="info">
|
||||
<group id="info">
|
||||
<group id="info-left">
|
||||
<field name="area" />
|
||||
<field name="heating" />
|
||||
</group>
|
||||
<group id="info-right" />
|
||||
<field name="property_child_ids" invisible="1" />
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
string="Rooms"
|
||||
name="rooms"
|
||||
groups="pms_base.group_pms_show_room"
|
||||
>
|
||||
<group name="floor_info" col="4">
|
||||
<field name="floors_num" />
|
||||
<field name="unit_floor" />
|
||||
</group>
|
||||
<group id="room">
|
||||
<group id="room-left" string="Quantities">
|
||||
<field name="qty_bedroom" string="Bedroom(s)" />
|
||||
<field
|
||||
name="qty_half_bathroom"
|
||||
string="Half Bathroom(s)"
|
||||
/>
|
||||
<field
|
||||
name="qty_living_room"
|
||||
string="Living Rom(s)"
|
||||
/>
|
||||
<field
|
||||
name="qty_dining_room"
|
||||
string="Dining Room(s)"
|
||||
/>
|
||||
<field name="qty_kitchen" string="Kitchen(s)" />
|
||||
</group>
|
||||
<group id="room-right">
|
||||
<field name="balcony" />
|
||||
<field name="laundry_room" />
|
||||
<field name="parking_lot" />
|
||||
<field name="pets" />
|
||||
<field name="terrace" />
|
||||
</group>
|
||||
</group>
|
||||
<field name="room_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="name" />
|
||||
<field name="type_id" />
|
||||
<field name="capacity" />
|
||||
<field name="area" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
string="Amenities"
|
||||
name="amenities"
|
||||
groups="pms_base.group_pms_show_amenity"
|
||||
>
|
||||
<field name="amenity_ids">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="type_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
string="Services"
|
||||
name="services"
|
||||
groups="pms_base.group_pms_show_service"
|
||||
>
|
||||
<field name="service_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="name" />
|
||||
<field name="vendor_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field
|
||||
name="message_ids"
|
||||
widget="mail_thread"
|
||||
options="{'post_refresh': 'recipients'}"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_property_search">
|
||||
<field name="name">pms.property.search</field>
|
||||
<field name="model">pms.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Property">
|
||||
<field
|
||||
name="name"
|
||||
filter_domain="['|', ('ref', 'ilike', self), ('name', 'ilike', self)]"
|
||||
/>
|
||||
<field name="team_id" />
|
||||
<separator />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="active"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<group expand="0" name="group_by" string="Group By">
|
||||
<filter
|
||||
name="group_building"
|
||||
string="Building"
|
||||
domain="[]"
|
||||
context="{'group_by' : 'parent_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_owner"
|
||||
string="Owner"
|
||||
context="{'group_by': 'owner_id'}"
|
||||
/>
|
||||
</group>
|
||||
<separator />
|
||||
<searchpanel>
|
||||
<field
|
||||
name="owner_id"
|
||||
string="Owners"
|
||||
enable_counters="1"
|
||||
icon="fa-user-o"
|
||||
/>
|
||||
<field
|
||||
name="team_id"
|
||||
string="Teams"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_property_tree" model="ir.ui.view">
|
||||
<field name="name">pms.property.tree</field>
|
||||
<field name="model">pms.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Properties">
|
||||
<field name="active" invisible="1" />
|
||||
<field name="ref" />
|
||||
<field name="name" />
|
||||
<field name="owner_id" />
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
<field name="team_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_property_kanban" model="ir.ui.view">
|
||||
<field name="name">pms.property.kanban</field>
|
||||
<field name="model">pms.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban sample="1">
|
||||
<field name="id" />
|
||||
<field name="activity_state" />
|
||||
<field name="color" />
|
||||
<progressbar
|
||||
field="activity_state"
|
||||
colors='{"planned": "success", "today": "warning", "overdue": "danger"}'
|
||||
/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="o_kanban_image">
|
||||
<img
|
||||
t-att-src="kanban_image('pms.property', 'image_1920', record.id.raw_value)"
|
||||
alt="Property"
|
||||
class="o_image_64_contain"
|
||||
/>
|
||||
</div>
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="name" />
|
||||
</strong>
|
||||
<div>
|
||||
<small t-if="record.street.value">
|
||||
<field name="street" />
|
||||
</small>
|
||||
</div>
|
||||
<div class="o_kanban_tags_section">
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- action -->
|
||||
<record id="action_pms_property" model="ir.actions.act_window">
|
||||
<field name="name">Properties</field>
|
||||
<field name="res_model">pms.property</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="property_action_from_dashboard" model="ir.actions.act_window">
|
||||
<field name="name">Properties</field>
|
||||
<field name="res_model">pms.property</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="context">{'default_team_id': active_id}</field>
|
||||
<field name="domain">[('team_id', '=', active_id)]</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
93
pms_base/views/pms_room.xml
Normal file
93
pms_base/views/pms_room.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="view_pms_room_form">
|
||||
<field name="name">pms.room.form</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Room">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-archive"
|
||||
>
|
||||
<field
|
||||
name="active"
|
||||
widget="boolean_button"
|
||||
options='{"terminology": "archive"}'
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="property_id" />
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="type_id" />
|
||||
<field name="capacity" />
|
||||
<field name="area" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_room_search">
|
||||
<field name="name">pms.room.search</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Room">
|
||||
<field name="name" />
|
||||
<field name="type_id" />
|
||||
<field name="capacity" />
|
||||
<newline />
|
||||
<searchpanel>
|
||||
<field
|
||||
name="property_id"
|
||||
string="Property"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
/>
|
||||
<field
|
||||
name="type_id"
|
||||
string="Room Types"
|
||||
enable_counters="1"
|
||||
icon="fa-hotel"
|
||||
color="#784f73"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_room_tree">
|
||||
<field name="name">pms.room.tree</field>
|
||||
<field name="model">pms.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Rooms" editable="bottom" multi_edit="1" sample="1">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="property_id" />
|
||||
<field name="name" />
|
||||
<field name="type_id" />
|
||||
<field name="capacity" />
|
||||
<field name="area" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_room">
|
||||
<field name="name">Rooms</field>
|
||||
<field name="res_model">pms.room</field>
|
||||
<field name="view_id" ref="view_pms_room_tree" />
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
44
pms_base/views/pms_room_type.xml
Normal file
44
pms_base/views/pms_room_type.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_room_type_form">
|
||||
<field name="name">pms.room.type.form</field>
|
||||
<field name="model">pms.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Room Type">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="icon" />
|
||||
</group>
|
||||
<group id="main-right" />
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_room_type_tree">
|
||||
<field name="name">pms.room.type.tree</field>
|
||||
<field name="model">pms.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Room Types">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_room_type">
|
||||
<field name="name">Room Types</field>
|
||||
<field name="res_model">pms.room.type</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
85
pms_base/views/pms_service.xml
Normal file
85
pms_base/views/pms_service.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="view_pms_service_form">
|
||||
<field name="name">pms.service.form</field>
|
||||
<field name="model">pms.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Service">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-archive"
|
||||
string="Archive"
|
||||
>
|
||||
<field
|
||||
name="active"
|
||||
widget="boolean_button"
|
||||
options='{"terminology": "archive"}'
|
||||
invisible="1"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="vendor_id" />
|
||||
<field name="property_id" />
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="sequence" />
|
||||
<field name="icon" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_service_search">
|
||||
<field name="name">pms.service.search</field>
|
||||
<field name="model">pms.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Service">
|
||||
<field name="name" />
|
||||
<field name="vendor_id" />
|
||||
<field name="property_id" />
|
||||
<newline />
|
||||
<searchpanel>
|
||||
<field
|
||||
name="vendor_id"
|
||||
string="Vendors"
|
||||
enable_counters="1"
|
||||
select="multi"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pms_service_tree">
|
||||
<field name="name">pms.service.tree</field>
|
||||
<field name="model">pms.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Services">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="property_id" />
|
||||
<field name="name" />
|
||||
<field name="vendor_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_service">
|
||||
<field name="name">Services</field>
|
||||
<field name="res_model">pms.service</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
81
pms_base/views/pms_stage.xml
Normal file
81
pms_base/views/pms_stage.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_stage_form" model="ir.ui.view">
|
||||
<field name="name">pms.stage.view.form</field>
|
||||
<field name="model">pms.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stage">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="stage_type" />
|
||||
<field
|
||||
name="team_ids"
|
||||
widget="many2many_tags"
|
||||
groups="pms_base.group_pms_show_team"
|
||||
/>
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="sequence" />
|
||||
<field name="custom_color" />
|
||||
<field name="fold" />
|
||||
<field name="is_closed" />
|
||||
<field name="is_default" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<field name="active" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stage_tree" model="ir.ui.view">
|
||||
<field name="name">pms.stage.view.tree</field>
|
||||
<field name="model">pms.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stages">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="stage_type" />
|
||||
<field name="is_closed" />
|
||||
<field name="custom_color" />
|
||||
<field name="active" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stage_search" model="ir.ui.view">
|
||||
<field name="name">pms.stage.view.</field>
|
||||
<field name="model">pms.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Stages">
|
||||
<field name="name" />
|
||||
<filter
|
||||
name="group_stage_type"
|
||||
string="Type"
|
||||
domain="[]"
|
||||
context="{'group_by':'stage_type'}"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pms_stage" model="ir.actions.act_window">
|
||||
<field name="name">PMS Stages</field>
|
||||
<field name="res_model">pms.stage</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_group_stage_type': 1}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
55
pms_base/views/pms_tag.xml
Normal file
55
pms_base/views/pms_tag.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Field Service Tag -->
|
||||
<record id="view_pms_tag_tree" model="ir.ui.view">
|
||||
<field name="name">Tags</field>
|
||||
<field name="model">pms.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Tags">
|
||||
<field name="full_name" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_tag_form" model="ir.ui.view">
|
||||
<field name="name">Tag</field>
|
||||
<field name="model">pms.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tag">
|
||||
<sheet>
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="parent_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="color" groups="base.group_no_one" />
|
||||
<field
|
||||
name="company_id"
|
||||
options="{'no_create': True}"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_pms_tag">
|
||||
<field name="name">Tags</field>
|
||||
<field name="res_model">pms.tag</field>
|
||||
<field name="view_id" ref="view_pms_tag_tree" />
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a tag.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
106
pms_base/views/pms_team.xml
Normal file
106
pms_base/views/pms_team.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_team_form" model="ir.ui.view">
|
||||
<field name="name">pms.team.view.form</field>
|
||||
<field name="model">pms.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Team">
|
||||
<header />
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="True" />
|
||||
</h1>
|
||||
<group id="main">
|
||||
<group id="main-left">
|
||||
<field name="description" />
|
||||
</group>
|
||||
<group id="main-right">
|
||||
<field name="sequence" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook />
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field
|
||||
name="message_ids"
|
||||
widget="mail_thread"
|
||||
options="{'post_refresh': 'recipients'}"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_team_tree" model="ir.ui.view">
|
||||
<field name="name">pms.team.view.tree</field>
|
||||
<field name="model">pms.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Teams">
|
||||
<field name="sequence" widget="handle" groups="base.group_no_one" />
|
||||
<field name="name" />
|
||||
<field name="description" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_pms_team_kanban" model="ir.ui.view">
|
||||
<field name="name">pms.team.kanban</field>
|
||||
<field name="model">pms.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban
|
||||
class="oe_background_grey o_kanban_dashboard o_emphasize_colors"
|
||||
create="0"
|
||||
>
|
||||
<field name="name" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div>
|
||||
<div t-attf-class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary">
|
||||
<span> <field name="name" /></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container o_kanban_card_content">
|
||||
<div class="row">
|
||||
<div class="col-5 o_kanban_primary_left">
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
name="%(pms_base.property_action_from_dashboard)d"
|
||||
type="action"
|
||||
style="margin-bottom: 05px;width: inherit;"
|
||||
context="{'search_default_team_properties': 1}"
|
||||
>
|
||||
<field name="property_count" />
|
||||
<br />
|
||||
Properties
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pms_team" model="ir.actions.act_window">
|
||||
<field name="name">PMS Teams</field>
|
||||
<field name="res_model">pms.team</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
230
pms_base/views/res_config_settings.xml
Normal file
230
pms_base/views/res_config_settings.xml
Normal file
@@ -0,0 +1,230 @@
|
||||
<odoo>
|
||||
<record id="view_res_config_settings_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.pms</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="40" />
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div
|
||||
class="app_settings_block"
|
||||
data-string="Property Management System"
|
||||
string="Properties"
|
||||
data-key="pms_base"
|
||||
groups="pms_base.group_pms_manager"
|
||||
>
|
||||
<h2>Property Information</h2>
|
||||
<div class="row mt16 o_settings_container" id="characteristics">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="pms_uom" string="Area (UoM)" />
|
||||
<div class="text-muted">
|
||||
Define your unit of measure when entering area
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field
|
||||
name="pms_uom"
|
||||
class="o_light_label"
|
||||
widget="radio"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_pms_show_amenity" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="group_pms_show_amenity"
|
||||
string="Show Amenities"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage amenities related to your properties
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_pms_show_room" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_pms_show_room" string="Show Rooms" />
|
||||
<div class="text-muted">
|
||||
Manage rooms of your properties
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_pms_show_service" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="group_pms_show_service"
|
||||
string="Show Services"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage services available at your properties
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_pms_show_team" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_pms_show_team" string="Show Teams" />
|
||||
<div class="text-muted">
|
||||
Split your properties by Team
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Accounting</h2>
|
||||
<div class="row mt16 o_settings_container" id="account">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_account" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_pms_account"
|
||||
string="Manage Accounting"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage accounting related information
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_account_asset" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_pms_account_asset"
|
||||
string="Manage Depreciation and Amortization"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage assets related to your properties
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_contract" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_pms_contract"
|
||||
string="Manage Contracts"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage utility contracts and others recurring invoices/bills
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Reservations</h2>
|
||||
<div class="row mt16 o_settings_container" id="sale">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_sale" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_pms_sale"
|
||||
string="Manage Reservations"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Manage reservations
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_crm" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_pms_crm" string="CRM" />
|
||||
<div class="text-muted">
|
||||
Link your leads to a property
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_website" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_pms_website" string="Website" />
|
||||
<div class="text-muted">
|
||||
Publish your properties on your website
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_pms_website_sale" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_pms_website_sale"
|
||||
string="Online reservation"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Allow customers to book reservations online
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Integrations</h2>
|
||||
<div class="row mt16 o_settings_container" id="connect">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_connector_guesty" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_connector_guesty"
|
||||
string="Connect with Guesty"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Publish properties to https://guesty.com and get reservations
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_connector_wubook" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="module_connector_wubook"
|
||||
string="Connect with Wubook"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Publish properties to https://wubook.com and get reservations
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_pms_config" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module': 'pms_base'}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
47
pms_base/views/res_partner_view.xml
Normal file
47
pms_base/views/res_partner_view.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_partner_form_inherit_pms_base" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.inherit.pms.base</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page name="property" string="Property" invisible="1">
|
||||
<group>
|
||||
<field name="is_property" />
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_partner_tree_inherit_pms_base" model="ir.ui.view">
|
||||
<field name="name">res.partner.tree.inherit.pms.base</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="is_property" optional="hide" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter_inherit_pms_base" model="ir.ui.view">
|
||||
<field name="name">res.partner.search.inherit.pms.base</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="after">
|
||||
<field name="is_property" />
|
||||
</field>
|
||||
<filter name="group_country" position="after">
|
||||
<filter
|
||||
name="group_is_property"
|
||||
string="Property"
|
||||
context="{'group_by': 'is_property'}"
|
||||
/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,4 +1 @@
|
||||
# generated from manifests external_dependencies
|
||||
bs4
|
||||
pycountry
|
||||
xlrd
|
||||
|
||||
1
setup/pms_base/odoo/addons/pms_base
Symbolic link
1
setup/pms_base/odoo/addons/pms_base
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../pms_base
|
||||
6
setup/pms_base/setup.py
Normal file
6
setup/pms_base/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user