[ADD] pms_website (#94)

This commit is contained in:
Ammar Officewala
2022-04-12 22:32:54 +05:30
committed by GitHub
parent c9058ae91e
commit a76ce2a94c
24 changed files with 2063 additions and 0 deletions

100
pms_website/README.rst Normal file
View File

@@ -0,0 +1,100 @@
=============
PMS - Website
=============
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fhttps://github.com/ursais/pms-lightgray.png?logo=github
:target: https://github.com/OCA/https://github.com/ursais/pms/tree/14.0-ADD-pms_website/pms_website
:alt: OCA/https://github.com/ursais/pms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/https://github.com/ursais/pms-14-0-ADD-pms_website/https://github.com/ursais/pms-14-0-ADD-pms_website-pms_website
:alt: Translate me on Weblate
|badge1| |badge2| |badge3| |badge4|
This module is the base module for the property management system (PMS) modules.
It provides the "Properties" apps with menu, settings, groups and data.
.. 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:
Configuration
=============
* Go to Properties > Configuration > Settings.
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/https://github.com/ursais/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/https://github.com/ursais/pms/issues/new?body=module:%20pms_website%0Aversion:%2014.0-ADD-pms_website%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
~~~~~~~
* Open Source Integrators
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
* `Open Source Integrators <https://www.opensourceintegrators.com>`:
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
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/https://github.com/ursais/pms <https://github.com/OCA/https://github.com/ursais/pms/tree/14.0-ADD-pms_website/pms_website>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

4
pms_website/__init__.py Normal file
View File

@@ -0,0 +1,4 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import controllers
from . import models

View File

@@ -0,0 +1,21 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "PMS - Website",
"summary": "Publish properties on the website",
"version": "14.0.1.0.0",
"development_status": "Alpha",
"category": "Generic Modules/Property Management System",
"website": "https://github.com/OCA/pms",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["pms_base", "website"],
"data": [
"security/ir.model.access.csv",
"data/rule.xml",
"views/pms_property_template.xml",
"views/pms_property.xml",
"views/pms_amenity_views.xml",
"views/pms_website_category_views.xml",
],
}

View File

@@ -0,0 +1,3 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import website

View File

@@ -0,0 +1,42 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from werkzeug.exceptions import NotFound
from odoo import http
from odoo.http import request
from odoo.addons.website.controllers.main import QueryURL, Website
class Website(Website):
@http.route(
['/property/<model("pms.property"):pms_property>'],
type="http",
auth="public",
website=True,
sitemap=True,
)
def product(self, pms_property, category="", search="", **kwargs):
if not pms_property.can_access_from_current_website():
raise NotFound()
return request.render(
"pms_website.property",
self._prepare_property_values(pms_property, category, search, **kwargs),
)
def _prepare_property_values(self, pms_property, category, search, **kwargs):
keep = QueryURL("/property")
return {
"property": pms_property,
"main_object": pms_property,
# 'search': search,
# 'category': category,
# 'pricelist': pricelist,
# 'attrib_values': attrib_values,
# 'attrib_set': attrib_set,
"keep": keep,
# 'categories': categs,
# 'product': product,
# 'add_qty': add_qty,
# 'view_track': view_track,
}

18
pms_website/data/rule.xml Normal file
View File

@@ -0,0 +1,18 @@
<odoo>
<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value
eval="[('module', '=', 'base'), ('name', '=', 'res_partner_portal_public_rule')]"
/>
</function>
<value eval="{'noupdate': False}" />
</function>
<record model="ir.rule" id="base.res_partner_portal_public_rule">
<field
name="domain_force"
>['|', ('id', 'child_of', user.commercial_partner_id.id), ('is_property', '=', True)]</field>
</record>
</odoo>

359
pms_website/i18n/es.po Normal file
View File

@@ -0,0 +1,359 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pms_website
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e-20211202\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-23 19:54+0000\n"
"PO-Revision-Date: 2021-12-23 19:54+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<br/>\n"
" <span class=\"normal\">Check out:</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">Pet-friendly apartments.</span>"
msgstr ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">Admite mascotas.</span>"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">Pets Are Not Allowed.</span>"
msgstr ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">No admite mascotas.</span>"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "<span class=\"normal\">Check in:</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "AM"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "All Amenities"
msgstr "Todas las amenidades"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Amenities"
msgstr "Amenidades"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Bathrooms"
msgstr "Baños"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Bedrooms"
msgstr "Recamaras"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__can_publish
msgid "Can Publish"
msgstr "Puede publicar"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Cancelation Policy"
msgstr "Política de cancelación"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__property_category_ids
#: model:ir.ui.menu,name:pms_website.menu_pms_website_category
msgid "Categories"
msgstr "Categorías"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.view_pms_website_category_form
#: model_terms:ir.ui.view,arch_db:pms_website.view_pms_website_category_form_tree
msgid "Category"
msgstr "Categoría"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__name
#: model:ir.model.fields,help:pms_website.field_pms_website_category__name
msgid "Category Name"
msgstr "Nombre de categoría"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"Change of plans? No worries. You can cancel up to 72 hours before your "
"check-in date for a full refund. For reservations close to check-in or "
"special cases, please contact our team, we will be glad to help."
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Check in &amp; Check out"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__child_ids
msgid "Children Property category"
msgstr "Categoría hija"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Close"
msgstr "Cerrar"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__create_date
msgid "Created on"
msgstr "Creado el"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Discover the featured amenities on this property"
msgstr "Descubre las amenidades de esa propiedad"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__display_name
#: model:ir.model.fields,field_description:pms_website.field_pms_property__display_name
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__display_name
msgid "Display Name"
msgstr ""
#. module: pms_website
#: code:addons/pms_website/models/pms_website_category.py:0
#, python-format
msgid "Error ! You cannot create recursive categories."
msgstr "Error! No pueden crear categorías recursivas."
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Explore all amenities"
msgstr "Explorar todas las amenidades"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Explore all amenities available in this property"
msgstr "xplorar todas las amenidades disponibles en esta propiedad"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Free parking spots nearby"
msgstr "Estacionamiento gratis cerca"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Guest(s)"
msgstr "Huespede(s)"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "House Rules"
msgstr "Reglas"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__id
#: model:ir.model.fields,field_description:pms_website.field_pms_property__id
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__id
msgid "ID"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_1920
msgid "Image"
msgstr "Imagen"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_1024
msgid "Image 1024"
msgstr "Imagen 1024"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_128
msgid "Image 128"
msgstr "Imagen 128"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_256
msgid "Image 256"
msgstr "Imagen 256"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_512
msgid "Image 512"
msgstr "Imagen 512"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__is_published
msgid "Is Published"
msgstr "Es publicada"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity____last_update
#: model:ir.model.fields,field_description:pms_website.field_pms_property____last_update
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category____last_update
msgid "Last Modified on"
msgstr "Ultima modificación el"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__write_uid
msgid "Last Updated by"
msgstr "Ultima modificación por"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__write_date
msgid "Last Updated on"
msgstr "Ultima modificación el"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Main Amenities"
msgstr "Amenidades principales"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__is_main_amenity
#: model:ir.model.fields,help:pms_website.field_pms_amenity__is_main_amenity
msgid "Main Amenity"
msgstr "Amenidad principal"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "PM"
msgstr ""
#. module: pms_website
#: model:ir.actions.act_window,name:pms_website.action_pms_website_category
msgid "PMS Category"
msgstr "Categoría"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parent_id
msgid "Parent Category"
msgstr "Categoría padre"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parent_path
msgid "Parent Path"
msgstr "Camino padre"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parents_and_self
msgid "Parents And Self"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Parking Availability"
msgstr "Disponibilidad de estacionamiento"
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_property
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__property_ids
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Property"
msgstr "Propiedad"
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_amenity
msgid "Property Amenity"
msgstr "Amenidad"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_description1
msgid "Property Description"
msgstr "Descripción de la propiedad"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_description2
msgid "Property Description 2"
msgstr "2da descripción de la propiedad"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Property Name"
msgstr "Nombre de la propiedad"
#. module: pms_website
#: model:ir.model.fields,help:pms_website.field_pms_property__website_id
#: model:ir.model.fields,help:pms_website.field_pms_website_category__website_id
msgid "Restrict publishing to this website."
msgstr "Restringir la publicación en este sitio web."
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__is_seo_optimized
msgid "SEO optimized"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__seo_name
msgid "Seo name"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,help:pms_website.field_pms_property__website_url
msgid "The full URL to access the document through the website."
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_published
msgid "Visible on current website"
msgstr "Visible en el sitio web"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_id
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_id
msgid "Website"
msgstr "Sitio web"
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_website_category
msgid "Website Property Category"
msgstr "Categoría del sitio web"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_url
msgid "Website URL"
msgstr "URL del sitio web"
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_description
msgid "Website meta description"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_keywords
msgid "Website meta keywords"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_title
msgid "Website meta title"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_og_img
msgid "Website opengraph image"
msgstr ""

View File

@@ -0,0 +1,355 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pms_website
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e-20211202\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-23 19:54+0000\n"
"PO-Revision-Date: 2021-12-23 19:54+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<br/>\n"
" <span class=\"normal\">Check out:</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">Pet-friendly apartments.</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"<span class=\"fa fa-circle-o\"/>\n"
" <span class=\"normal\">Pets Are Not Allowed.</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "<span class=\"normal\">Check in:</span>"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "AM"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "All Amenities"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Amenities"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Bathrooms"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Bedrooms"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__can_publish
msgid "Can Publish"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Cancelation Policy"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__property_category_ids
#: model:ir.ui.menu,name:pms_website.menu_pms_website_category
msgid "Categories"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.view_pms_website_category_form
#: model_terms:ir.ui.view,arch_db:pms_website.view_pms_website_category_form_tree
msgid "Category"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__name
#: model:ir.model.fields,help:pms_website.field_pms_website_category__name
msgid "Category Name"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid ""
"Change of plans? No worries. You can cancel up to 72 hours before your "
"check-in date for a full refund. For reservations close to check-in or "
"special cases, please contact our team, we will be glad to help."
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Check in &amp; Check out"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__child_ids
msgid "Children Property category"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Close"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__create_uid
msgid "Created by"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__create_date
msgid "Created on"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Discover the featured amenities on this property"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__display_name
#: model:ir.model.fields,field_description:pms_website.field_pms_property__display_name
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__display_name
msgid "Display Name"
msgstr ""
#. module: pms_website
#: code:addons/pms_website/models/pms_website_category.py:0
#, python-format
msgid "Error ! You cannot create recursive categories."
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Explore all amenities"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Explore all amenities available in this property"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Free parking spots nearby"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Guest(s)"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "House Rules"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__id
#: model:ir.model.fields,field_description:pms_website.field_pms_property__id
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__id
msgid "ID"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_1920
msgid "Image"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_1024
msgid "Image 1024"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_128
msgid "Image 128"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_256
msgid "Image 256"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__image_512
msgid "Image 512"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__is_published
msgid "Is Published"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity____last_update
#: model:ir.model.fields,field_description:pms_website.field_pms_property____last_update
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category____last_update
msgid "Last Modified on"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__write_uid
msgid "Last Updated by"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__write_date
msgid "Last Updated on"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Main Amenities"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_amenity__is_main_amenity
#: model:ir.model.fields,help:pms_website.field_pms_amenity__is_main_amenity
msgid "Main Amenity"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "PM"
msgstr ""
#. module: pms_website
#: model:ir.actions.act_window,name:pms_website.action_pms_website_category
msgid "PMS Category"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parent_id
msgid "Parent Category"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parent_path
msgid "Parent Path"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__parents_and_self
msgid "Parents And Self"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Parking Availability"
msgstr ""
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_property
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__property_ids
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Property"
msgstr ""
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_amenity
msgid "Property Amenity"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_description1
msgid "Property Description"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_description2
msgid "Property Description 2"
msgstr ""
#. module: pms_website
#: model_terms:ir.ui.view,arch_db:pms_website.property
msgid "Property Name"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,help:pms_website.field_pms_property__website_id
#: model:ir.model.fields,help:pms_website.field_pms_website_category__website_id
msgid "Restrict publishing to this website."
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__is_seo_optimized
msgid "SEO optimized"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__seo_name
msgid "Seo name"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,help:pms_website.field_pms_property__website_url
msgid "The full URL to access the document through the website."
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_published
msgid "Visible on current website"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_id
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_id
msgid "Website"
msgstr ""
#. module: pms_website
#: model:ir.model,name:pms_website.model_pms_website_category
msgid "Website Property Category"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_property__website_url
msgid "Website URL"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_description
msgid "Website meta description"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_keywords
msgid "Website meta keywords"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_title
msgid "Website meta title"
msgstr ""
#. module: pms_website
#: model:ir.model.fields,field_description:pms_website.field_pms_website_category__website_meta_og_img
msgid "Website opengraph image"
msgstr ""

View File

@@ -0,0 +1,5 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import pms_property
from . import pms_amenity
from . import pms_website_category

View File

@@ -0,0 +1,11 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class PmsAmenity(models.Model):
_inherit = "pms.amenity"
is_main_amenity = fields.Boolean(
string="Main Amenity", help="Main Amenity", default=False
)

View File

@@ -0,0 +1,47 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import werkzeug.urls
from odoo import fields, models
from odoo.tools.translate import html_translate
from odoo.addons.http_routing.models.ir_http import slug
class PmsProperty(models.Model):
_name = "pms.property"
_inherit = ["pms.property", "website.published.mixin", "website.multi.mixin"]
def _compute_website_url(self):
for pms_property in self:
if pms_property.id:
pms_property.website_url = "/property/%s" % slug(pms_property)
def google_map_link(self):
property_partner = self.sudo().partner_id
property_partner.geo_localize()
params = {
"q": "%s, %s"
% (property_partner.partner_latitude, property_partner.partner_longitude),
"z": 10,
}
return "https://maps.google.com/maps?" + werkzeug.urls.url_encode(params)
property_category_ids = fields.Many2many(
string="Categories",
required=False,
comodel_name="pms.website.category",
relation="property_category_rel",
)
website_description1 = fields.Html(
"Property Description",
sanitize_attributes=False,
translate=html_translate,
sanitize_form=False,
)
website_description2 = fields.Html(
"Property Description 2",
sanitize_attributes=False,
translate=html_translate,
sanitize_form=False,
)

View File

@@ -0,0 +1,50 @@
# Copyright (c) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class PMSWebsiteCategory(models.Model):
_name = "pms.website.category"
_inherit = ["website.seo.metadata", "website.multi.mixin", "image.mixin"]
_description = "Website Property Category"
_parent_store = True
_order = "name, id"
name = fields.Char(string="Category Name", help="Category Name", required=True)
parent_path = fields.Char(index=True)
parents_and_self = fields.Many2many(
"pms.website.category", compute="_compute_parents_and_self_new"
)
parent_id = fields.Many2one(
string="Parent Category",
comodel_name="pms.website.category",
index=True,
ondelete="cascade",
)
child_ids = fields.One2many(
"pms.website.category", "parent_id", string="Children Property category"
)
property_ids = fields.Many2many("pms.property", relation="property_category_rel")
@api.constrains("parent_id")
def check_parent_id(self):
if not self._check_recursion():
raise ValueError(_("Error ! You cannot create recursive categories."))
def name_get(self):
res = []
for category in self:
for category in self:
res.append(
(category.id, " / ".join(category.parents_and_self.mapped("name")))
)
return res
def _compute_parents_and_self_new(self):
for category in self:
if category.parent_path:
category.parents_and_self = self.env["pms.website.category"].browse(
[int(p) for p in category.parent_path.split("/")[:-1]]
)
else:
category.parents_and_self = category

View File

@@ -0,0 +1 @@
* Go to Properties > Configuration > Settings.

View 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>

View 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.

View File

@@ -0,0 +1 @@
To use this module, please read the complete user guide at `<roomdoo.com>`_.

View File

@@ -0,0 +1,7 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_pms_property_public,access_property_public,pms_base.model_pms_property,,1,1,1,1
access_pms_room_public,access_pms_room,pms_base.model_pms_room,,1,0,0,0
access_pms_amenity_public,access_pms_amenity,pms_base.model_pms_amenity,,1,0,0,0
access_pms_service,access_pms_service,pms_base.model_pms_service,,1,0,0,0
access_pms_website_category,access_pms_website_category,model_pms_website_category,base.group_user,1,1,1,0
access_pms_website_category_public,access_pms_website_category_public,model_pms_website_category,,1,0,0,0
1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
2 access_pms_property_public access_property_public pms_base.model_pms_property 1 1 1 1
3 access_pms_room_public access_pms_room pms_base.model_pms_room 1 0 0 0
4 access_pms_amenity_public access_pms_amenity pms_base.model_pms_amenity 1 0 0 0
5 access_pms_service access_pms_service pms_base.model_pms_service 1 0 0 0
6 access_pms_website_category access_pms_website_category model_pms_website_category base.group_user 1 1 1 0
7 access_pms_website_category_public access_pms_website_category_public model_pms_website_category 1 0 0 0

View File

@@ -0,0 +1,452 @@
<?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: http://docutils.sourceforge.net/" />
<title>PMS - Website</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-website">
<h1 class="title">PMS - Website</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/https://github.com/ursais/pms/tree/14.0-ADD-pms_website/pms_website"><img alt="OCA/https://github.com/ursais/pms" src="https://img.shields.io/badge/github-OCA%2Fhttps://github.com/ursais/pms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/https://github.com/ursais/pms-14-0-ADD-pms_website/https://github.com/ursais/pms-14-0-ADD-pms_website-pms_website"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a></p>
<p>This module is the base module for the property management system (PMS) modules.</p>
<p>It provides the “Properties” apps with menu, settings, groups and data.</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="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<ul class="simple">
<li>Go to Properties &gt; Configuration &gt; Settings.</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">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="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/https://github.com/ursais/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/https://github.com/ursais/pms/issues/new?body=module:%20pms_website%0Aversion:%2014.0-ADD-pms_website%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="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple">
<li>Open Source Integrators</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Alexandre Díaz</li>
<li>Pablo Quesada</li>
<li>Jose Luis Algara</li>
<li><cite>Commit [Sun] &lt;https://www.commitsun.com&gt;</cite>:<ul>
<li>Dario Lodeiros</li>
<li>Eric Antones</li>
<li>Sara Lago</li>
<li>Brais Abeijon</li>
<li>Miguel Padin</li>
</ul>
</li>
<li><cite>Open Source Integrators &lt;https://www.opensourceintegrators.com&gt;</cite>:<ul>
<li>Maxime Chambreuil &lt;<a class="reference external" href="mailto:mchambreuil&#64;opensourceintegrators.com">mchambreuil&#64;opensourceintegrators.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">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/https://github.com/ursais/pms/tree/14.0-ADD-pms_website/pms_website">OCA/https://github.com/ursais/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>

View File

@@ -0,0 +1,14 @@
<odoo>
<record id="view_pms_amenity_form_inherit_pms_website" model="ir.ui.view">
<field name="name">pms.amenity.form.inherit</field>
<field name="model">pms.amenity</field>
<field name="inherit_id" ref="pms_base.view_pms_amenity_form" />
<field name="arch" type="xml">
<field name="type_id" position="after">
<field name="is_main_amenity" />
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,17 @@
<odoo>
<record id="view_pms_property_form_inherit_pms_website" model="ir.ui.view">
<field name="name">pms.property.view.form.inherit</field>
<field name="model">pms.property</field>
<field name="inherit_id" ref="pms_base.view_pms_property_form" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<field name="is_published" widget="website_redirect_button" />
</div>
<field name="team_id" position="after">
<field name="property_category_ids" widget="many2many_tags" />
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,482 @@
<odoo>
<template id="property" name="Property" track="1">
<t t-call="website.layout">
<t t-set="additional_title" t-value="property.name" />
<div
class="oe_structure oe_empty"
id="oe_structure_website_sale_property_1"
/>
<div
itemscope="itemscope"
itemtype="http://schema.org/Product"
id="wrap"
class="js_sale"
>
<section
t-attf-class="container py-2 oe_website_sale"
id="product_detail"
t-att-data-view-track="view_track and '1' or '0'"
>
<div class="row">
<div class="col-md-4">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a t-att-href="keep()">Property</a>
</li>
<li class="breadcrumb-item active">
<span t-field="property.name" />
</li>
</ol>
</div>
<div class="col-md-8">
<!-- <div class="form-inline justify-content-end">
<t t-call="website_sale.search">
<t t-set="search" t-value="False"/>
</t>
<t t-call="website_sale.pricelist_list">
<t t-set="_classes" t-valuef="ml-2"/>
</t>
</div> -->
</div>
</div>
<div
itemprop="description"
t-field="property.website_description1"
class="oe_structure oe_empty mt16"
t-attf-id="oe_structure_website_sale_property_{{property.id}}_3"
/>
<div class="row">
<div
id="o-carousel-product"
class="carousel slide"
data-ride="carousel"
data-interval="0"
>
<div
t-field="property.image_1920"
class="d-flex align-items-center justify-content-center h-100"
t-options='{"widget": "image", "preview_image": "image_1024", "class": "product_detail_img mh-100", "alt-field": "name", "itemprop": "image"}'
/>
</div>
</div>
<div class="row">
<div class="col-md-12 pt-3 pb-3 " id="product_details">
<h1
itemprop="name"
t-field="property.name"
>Property Name</h1>
<span
itemprop="url"
style="display:none;"
t-esc="property.website_url"
/>
<h4 class="mt-3" t-if="property.partner_id">
<a
itemprop="name"
t-att-href="property.google_map_link()"
target="_BLANK"
>
<span t-field="property.city" />
</a>
</h4>
</div>
</div>
<div class="row">
<div t-if="property.qty_living_room" class="col-8">
<ul
class="list-group direction-vertical "
style="font-size: 15px;line-height: 20px;"
>
<table>
<tr>
<h5 t-if="property.parent_id">
<i class="fa fa-building" />
<span
itemprop="parent_name"
t-field="property.parent_id"
/>
</h5>
</tr>
<tr>
<td t-if="property.qty_living_room">
<div class="pt-0 pr-3">
<t
t-set="icon"
t-value="env.ref('pms_base.pms_room_type_living').sudo().icon"
/>
<!-- <t t-foreach="property.room_ids" t-as="room"> -->
<span t-attf-class="{{icon}}" />
<!-- </t> -->
</div>
</td>
<td t-if="property.qty_living_room">
<span
style="font-size: 20px; line-height: 40px;"
t-esc="property.qty_living_room"
/> Bedrooms
</td>
<td t-if="property.qty_half_bathroom">
<div class="pt-0 pr-3">
<t
t-set="icon"
t-value="env.ref('pms_base.pms_room_type_half_bath').sudo().icon"
/>
<!-- <t t-foreach="property.room_ids" t-as="room"> -->
<span t-attf-class="{{icon}}" />
<!-- </t> -->
</div>
</td>
<td t-if="property.qty_half_bathroom">
<span
style="font-size: 20px; line-height: 40px;"
t-esc="property.qty_half_bathroom"
/> Bathrooms
</td>
<td t-if="property.no_of_guests">
<div class="pt-0 pr-3">
<span class="fa fa-users" />
</div>
</td>
<td t-if="property.no_of_guests">
<span
style="font-size: 20px;"
t-field="property.no_of_guests"
/> Guest(s)
</td>
<!-- <span
style="font-size: 20px;"
t-esc="room.name"
/> -->
</tr>
<tr>
<!-- <td> -->
<td>
<div class="pt-0 pr-3">
<span class="fa fa-home" />
</div>
</td>
<td><span t-field="property.area" /></td>
</tr>
<!-- <div class=s"pt-5 pr-0"> -->
<t
t-if="property.service_ids"
t-foreach="property.sudo().service_ids"
t-as="service"
>
<tr>
<td>
<div class="pt-0 pr-3">
<span t-attf-class="{{service.icon}}" />
</div>
</td>
<td class="w-25">
<span t-esc="service.name.name" />
</td>
</tr>
</t>
</table>
</ul>
</div>
</div>
<div t-if="property.parking_lot" class="section-margin mt-3">
<ul class="list-group direction-vertical">
<li
class="sc-bBHxTw ljStsE list-group-item d-flex p-0 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-car" />
</div>
<div class="flex-grow-1">
<div class="mb-1">
<h5
class="mb-0 item-header"
>Parking Availability</h5>
</div>
<div class="mb-1">
<p
style="font-size: 15px; line-height:22px;"
>Free parking spots nearby</p>
</div>
</div>
</li>
</ul>
</div>
<div
itemprop="description"
t-field="property.website_description2"
class="oe_structure oe_empty mt16"
t-attf-id="oe_structure_website_sale_property_{{property.id}}_4"
/>
</section>
<section class="row section-margin">
<div class="col-12">
<section class="container">
<ul
class="list-group direction-horizontal row"
style="flex-direction: row !important; flex-wrap: wrap;"
>
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 p-3 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-clock-o" />
</div>
<div class="flex-grow-1">
<div class="mb-1">
<p
class="mb-0 item-header"
> Check in &amp; Check out </p>
</div>
<div class="mb-1">
<div class="d-flex justify-content-between">
<div>
<t
t-if="(property.checkin &lt; 12.0 or property.checkout &lt; 12.0)"
>
<t t-set="tz">AM</t>
</t>
<t
t-if="(property.checkin &gt; 12.0 or property.checkout &gt; 12.0)"
>
<t t-set="tz">PM</t>
</t>
<span
class="normal"
>Check in:</span> <span
t-field="property.checkin"
t-options='{"widget": "float", "precision": 2}'
/> <span t-esc="tz" />
<br />
<span
class="normal"
>Check out:</span> <span
t-field="property.checkout"
t-options='{"widget": "float", "precision": 2}'
/> <span t-esc="tz" />
</div>
</div>
</div>
</div>
</li>
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 p-3 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-check-square-o" />
</div>
<div class="flex-grow-1">
<div class="mb-1">
<p
class="mb-0 item-header"
> House Rules </p>
</div>
<div class="mb-1">
<div class="d-flex justify-content-between">
<div>
<t t-if="property.pets">
<span class="fa fa-circle-o" />
<span
class="normal"
>Pet-friendly apartments.</span>
</t>
<t t-elif="property.pets== False">
<span class="fa fa-circle-o" />
<span
class="normal"
>Pets Are Not Allowed.</span>
</t>
</div>
</div>
</div>
</div>
</li>
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 p-3 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-times-circle-o" />
</div>
<div class="flex-grow-1">
<div class="mb-1">
<p
class="mb-0 item-header"
> Cancelation Policy </p>
</div>
<div class="mb-1">
<div class="d-flex justify-content-between">
<div>
<p
class="text-justify"
>Change of plans? No worries. You can cancel up to 72 hours before your check-in date for a full refund. For reservations close to check-in or special cases, please contact our team, we will be glad to help.</p>
</div>
</div>
</div>
</div>
</li>
</ul>
</section>
</div>
</section>
<section
t-attf-class="container py-2 oe_website_sale"
id="product_detail"
t-if="property.amenity_ids"
t-att-data-view-track="view_track and '1' or '0'"
>
<div class="container">
<h2 class="text-center mb-5 item-header">Amenities</h2>
</div>
<div class="container">
<ul
class="list-group direction-horizontal"
style="font-size: 15px;line-height: 20px; flex-direction: row !important; flex-wrap: wrap;"
>
<t
t-if="property.amenity_ids"
t-foreach="property.amenity_ids"
t-as="amenity"
>
<t t-if="amenity.is_main_amenity">
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-circle-o" />
</div>
<div class="flex-grow-1">
<p class="mb-1"> <span
t-esc="amenity.name"
/></p>
</div>
</li>
</t>
</t>
</ul>
</div>
<div class="row">
<div class="w-100 d-flex col-12 mt-5">
<button
class="btn btn-primary d-flex align-items-center justify-content-center btn-square btn btn-outline-dark mx-auto "
style="background:white; width:100%; max-width: 380px;"
data-toggle="modal"
data-target="#exampleModalPreview"
>
<p class="mb-0 normal text-dark">Explore all amenities</p>
</button>
</div>
</div>
</section>
<div
class="modal fade right"
id="exampleModalPreview"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalPreviewLabel"
aria-hidden="true"
>
<div
class="modal-dialog-full-width modal-dialog momodel modal-fluid modal-xl"
role="document"
>
<div class="modal-content-full-width modal-content ">
<div
class=" modal-header-full-width modal-header text-center"
>
<div class="row container h-100">
<div class="padding-y col-12 col-12 text-center">
<h3 class="h3">Main Amenities</h3>
<p
>Discover the featured amenities on this property</p>
</div>
</div>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
><span class="fa fa-times" /></button>
</div>
<div class="modal-body">
<ul
class="list-group direction-horizontal ml-5"
style="font-size: 15px;line-height: 20px; flex-direction: row !important; flex-wrap: wrap;"
>
<t
t-if="property.amenity_ids"
t-foreach="property.amenity_ids"
t-as="amenity"
>
<t t-if="amenity.is_main_amenity">
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-circle-o" />
</div>
<div class="flex-grow-1">
<p class="mb-1"> <span
t-esc="amenity.name"
/></p>
</div>
</li>
</t>
</t>
</ul>
<div class="row container h-100 mt-3">
<div class="padding-y col-12 col-12 text-center">
<h3 class="h3">All Amenities</h3>
<p
>Explore all amenities available in this property</p>
</div>
</div>
<ul
class="list-group direction-horizontal ml-5"
style="font-size: 15px;line-height: 20px; flex-direction: row !important; flex-wrap: wrap;"
>
<t
t-if="property.amenity_ids"
t-foreach="property.amenity_ids"
t-as="amenity"
>
<t t-if="amenity.is_main_amenity== False">
<li
class="list-group-item d-flex p-0 col col-sm-6 col-md-4 my-2 border-0"
>
<div class="pt-0 pr-3">
<span class="fa fa-circle-o" />
</div>
<div class="flex-grow-1">
<p class="mb-1"> <span
t-esc="amenity.name"
/></p>
</div>
</li>
</t>
</t>
</ul>
</div>
</div>
</div>
</div>
</div>
<div
class="oe_structure oe_empty"
id="oe_structure_website_sale_property_2"
/>
</t>
</template>
</odoo>

View File

@@ -0,0 +1,50 @@
<odoo>
<record id="view_pms_website_category_form" model="ir.ui.view">
<field name="name">pms.website.category.form</field>
<field name="model">pms.website.category</field>
<field name="arch" type="xml">
<form string="Category">
<header />
<sheet>
<label for="name" class="oe_edit_only" />
<h1>
<field name="name" required="True" />
</h1>
<group id="main">
<group id="main-left">
<field name="parent_id" />
<field name="child_ids" invisible="1" />
</group>
<group id="main-right" />
</group>
<notebook />
</sheet>
</form>
</field>
</record>
<record id="view_pms_website_category_form_tree" model="ir.ui.view">
<field name="name">pms.website.category.tree</field>
<field name="model">pms.website.category</field>
<field name="arch" type="xml">
<tree string="Category">
<field name="name" />
</tree>
</field>
</record>
<record id="action_pms_website_category" model="ir.actions.act_window">
<field name="name">PMS Category</field>
<field name="res_model">pms.website.category</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem
id="menu_pms_website_category"
name="Categories"
parent="pms_base.menu_config_property"
sequence="30"
action="action_pms_website_category"
/>
</odoo>

View File

@@ -0,0 +1 @@
../../../../pms_website

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)