Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pms/models/pms_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ def _compute_commission_amount(self):
for reservation in self:
if reservation.commission_percent > 0:
reservation.commission_amount = (
reservation.price_total * reservation.commission_percent
reservation.price_total * reservation.commission_percent / 100
)
else:
reservation.commission_amount = 0
Expand Down
1 change: 1 addition & 0 deletions pms/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ProductTemplate(models.Model):
)
daily_limit = fields.Integer("Daily limit")
is_extra_bed = fields.Boolean("Is extra bed", default=False)
is_crib = fields.Boolean("Is a baby crib", default=False)
show_in_calendar = fields.Boolean(
"Show in Calendar",
default=False,
Expand Down
1 change: 1 addition & 0 deletions pms/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
options="{'no_create': True,'no_open': True}"
/>
<field name="is_extra_bed" />
<field name="is_crib" />
<field name="daily_limit" />
<field name="show_in_calendar" />
</group>
Expand Down
76 changes: 76 additions & 0 deletions pms_data_bi/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
REVENUE EXPORTER
================

Export Odoo data for Revenue MyDataBI

Usage
=======
To use this module, you need to:

Create a user and give the "Hotel Management / Export data BI" permission.

To connect to Odoo via xmlrpc there are examples in https://www.odoo.com/documentation/10.0/api_integration.html in the "Calling methods" section with examples in several languages.

A python example:
import xmlrpclib

url = 'https://www.example.org'

username = '[email protected]'

password = '123passwordexample'

db = 'example_db_name'

common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))

uid = common.authenticate(db, username, password, {})

models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))

models.execute_kw(db, uid, password,'data_bi','export_data_bi', [ 8, 1, '2018-01-01'])

In the parameters of export_data_bi:

archivo == 1 'Tarifa'

archivo == 2 'Canal'

archivo == 3 'Hotel'

archivo == 4 'Pais'

archivo == 5 'Regimen'

archivo == 6 'Reservas'

archivo == 7 'Capacidad'

archivo == 8 'Tipo Habitación'

archivo == 9 'Budget'

archivo == 10 'Bloqueos'

archivo == 11 'Motivo Bloqueo'

archivo == 12 'Segmentos'

archivo == 13 'Clientes'

archivo == 14 'Estado Reservas'

company_id == company's id or False for all

fechafoto = start date to take data

in the example recive 8 'Tipo Habitación' from company_id 1 from '2018-01-01'


Credits
=======

Creator
------------

* Jose Luis Algara (Alda hotels) <[email protected]>
1 change: 1 addition & 0 deletions pms_data_bi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions pms_data_bi/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2018-2021 Jose Luis Algara Toledo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "PMS Data Bi",
"summary": "Export hotel data for business intelligence",
"version": "14.0.3.0.0",
"license": "AGPL-3",
"author": "Jose Luis Algara (Alda hotels) <[email protected]>, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pms",
"depends": ["pms", "pms_l10n_es"],
"category": "Generic Modules/Property Management System",
"data": [
"views/budget.xml",
"views/inherit_pms_property.xml",
"views/inherit_res_users.xml",
"security/data_bi.xml",
"security/ir.model.access.csv",
],
"demo": [],
"installable": True,
"auto_install": False,
}
Loading