From c380d37aa5216525a115d19449255746b28c17ba Mon Sep 17 00:00:00 2001 From: QS5ELkMu Date: Sun, 19 Aug 2018 03:44:09 +0200 Subject: [PATCH] [WIP][MIG][11.0] Odoo Connector --- .../__manifest__.py | 2 +- .../components/backend_adapter.py | 1 - hotel_channel_connector/components/core.py | 2 +- .../components/exporter.py | 1 + .../components/importer.py | 1 + hotel_channel_connector/data/cron_jobs.xml | 4 +- hotel_channel_connector/data/menus.xml | 36 +++------ hotel_channel_connector/data/sequences.xml | 4 +- ...py => hotel_channel_connector_ota_info.py} | 0 .../models/hotel_reservation/common.py | 2 +- hotel_channel_connector/views/general.xml | 8 +- ....xml => hotel_channel_connector_issue.xml} | 36 ++++----- .../views/inherited_hotel_folio_views.xml | 4 +- .../inherited_hotel_reservation_views.xml | 20 ++--- ..._hotel_virtual_room_availability_views.xml | 4 +- .../inherited_hotel_virtual_room_views.xml | 10 +-- ...inherited_product_pricelist_item_views.xml | 10 +-- .../inherited_product_pricelist_views.xml | 14 ++-- ...nherited_reservation_restriction_views.xml | 6 +- .../views/res_config_views.xml | 81 ++++++++++++++++++- .../views/wubook_channel_info_views.xml | 33 -------- ...ubook_hotel_channel_connector_ota_info.xml | 33 ++++++++ 22 files changed, 188 insertions(+), 124 deletions(-) rename hotel_channel_connector/models/{wubook_channel_info.py => hotel_channel_connector_ota_info.py} (100%) rename hotel_channel_connector/views/{wubook_issue_views.xml => hotel_channel_connector_issue.xml} (60%) delete mode 100644 hotel_channel_connector/views/wubook_channel_info_views.xml create mode 100644 hotel_channel_connector/views/wubook_hotel_channel_connector_ota_info.xml diff --git a/hotel_calendar_channel_connector/__manifest__.py b/hotel_calendar_channel_connector/__manifest__.py index ac888bdc5..a9a707498 100644 --- a/hotel_calendar_channel_connector/__manifest__.py +++ b/hotel_calendar_channel_connector/__manifest__.py @@ -46,7 +46,7 @@ 'test': [ ], - 'installable': True, + 'installable': False, 'auto_install': True, 'application': False, 'license': 'AGPL-3', diff --git a/hotel_channel_connector/components/backend_adapter.py b/hotel_channel_connector/components/backend_adapter.py index a644a071d..d40ee0446 100644 --- a/hotel_channel_connector/components/backend_adapter.py +++ b/hotel_channel_connector/components/backend_adapter.py @@ -1,6 +1,5 @@ from odoo.addons.component.core import AbstractComponent from odoo.addons.queue_job.exception import RetryableJobError -from odoo.addons.queue_job.exception import RetryableJobError from odoo.tools import ( DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT) diff --git a/hotel_channel_connector/components/core.py b/hotel_channel_connector/components/core.py index 5502f0b40..9ed977565 100644 --- a/hotel_channel_connector/components/core.py +++ b/hotel_channel_connector/components/core.py @@ -1,5 +1,5 @@ from odoo.addons.component.core import AbstractComponent - +from odoo import api class BaseHotelChannelConnectorComponent(AbstractComponent): _name = 'base.hotel.channel.connector' diff --git a/hotel_channel_connector/components/exporter.py b/hotel_channel_connector/components/exporter.py index 16080ec73..3b92a7323 100644 --- a/hotel_channel_connector/components/exporter.py +++ b/hotel_channel_connector/components/exporter.py @@ -7,6 +7,7 @@ from odoo.tools import ( DEFAULT_SERVER_DATETIME_FORMAT) from .backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT from odoo.addons.hotel import date_utils +from odoo import api _logger = logging.getLogger(__name__) class HotelChannelConnectorExporter(AbstractComponent): diff --git a/hotel_channel_connector/components/importer.py b/hotel_channel_connector/components/importer.py index 1e7832046..4a57f0589 100644 --- a/hotel_channel_connector/components/importer.py +++ b/hotel_channel_connector/components/importer.py @@ -6,6 +6,7 @@ from odoo.tools import ( DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT) from .backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT +from odoo import api _logger = logging.getLogger(__name__) class HotelChannelConnectorImporter(AbstractComponent): diff --git a/hotel_channel_connector/data/cron_jobs.xml b/hotel_channel_connector/data/cron_jobs.xml index a92b53d2f..2810968b4 100644 --- a/hotel_channel_connector/data/cron_jobs.xml +++ b/hotel_channel_connector/data/cron_jobs.xml @@ -1,5 +1,5 @@ - + - - \ No newline at end of file + + diff --git a/hotel_channel_connector/views/wubook_issue_views.xml b/hotel_channel_connector/views/hotel_channel_connector_issue.xml similarity index 60% rename from hotel_channel_connector/views/wubook_issue_views.xml rename to hotel_channel_connector/views/hotel_channel_connector_issue.xml index bd4425dc4..0281f605b 100644 --- a/hotel_channel_connector/views/wubook_issue_views.xml +++ b/hotel_channel_connector/views/hotel_channel_connector_issue.xml @@ -2,11 +2,11 @@ - - wubook.issue.form - wubook.issue + + hotel.channel.coonector.issue.form + hotel.channel.coonector.issue -
+
- + - - + +
@@ -36,34 +36,34 @@
- - wubook.issue.tree - wubook.issue + + hotel.channel.coonector.issue.tree + hotel.channel.coonector.issue tree - + - + - + - - wubook.issue.search - wubook.issue + + hotel.channel.coonector.issue.search + hotel.channel.coonector.issue - + - + diff --git a/hotel_channel_connector/views/inherited_hotel_folio_views.xml b/hotel_channel_connector/views/inherited_hotel_folio_views.xml index f50517e74..1f39f8702 100644 --- a/hotel_channel_connector/views/inherited_hotel_folio_views.xml +++ b/hotel_channel_connector/views/inherited_hotel_folio_views.xml @@ -18,7 +18,7 @@ - + {'readonly': [('wis_from_channel', '!=', False)]} @@ -28,7 +28,7 @@ - + {'readonly': [('wis_from_channel', '!=', False)]} diff --git a/hotel_channel_connector/views/inherited_hotel_reservation_views.xml b/hotel_channel_connector/views/inherited_hotel_reservation_views.xml index cf58536e5..faae321a5 100644 --- a/hotel_channel_connector/views/inherited_hotel_reservation_views.xml +++ b/hotel_channel_connector/views/inherited_hotel_reservation_views.xml @@ -10,13 +10,13 @@ - + - @@ -25,8 +25,8 @@ - - + + @@ -37,22 +37,22 @@ - {'readonly': [('wis_from_channel','=',True),('able_to_modify_wubook','=',False)]} + {'readonly': [('is_from_ota','=',True),('able_to_modify_wubook','=',False)]} - {'readonly': [('wrid','!=',False),('able_to_modify_wubook','=',False)]} + {'readonly': [('channel_reservation_id','!=',False),('able_to_modify_wubook','=',False)]} - {'readonly': [('wis_from_channel','=',True),('able_to_modify_wubook','=',False)]} + {'readonly': [('is_from_ota','=',True),('able_to_modify_wubook','=',False)]} - {'readonly': [('wis_from_channel','=',True),('able_to_modify_wubook','=',False)]} + {'readonly': [('is_from_ota','=',True),('able_to_modify_wubook','=',False)]} - {'readonly': [('wis_from_channel','=',True),('able_to_modify_wubook','=',False)]} + {'readonly': [('is_from_ota','=',True),('able_to_modify_wubook','=',False)]} - {'readonly': [('wis_from_channel','=',True),('able_to_modify_wubook','=',False)]} + {'readonly': [('is_from_ota','=',True),('able_to_modify_wubook','=',False)]} diff --git a/hotel_channel_connector/views/inherited_hotel_virtual_room_availability_views.xml b/hotel_channel_connector/views/inherited_hotel_virtual_room_availability_views.xml index 4cf867141..46ada881c 100644 --- a/hotel_channel_connector/views/inherited_hotel_virtual_room_availability_views.xml +++ b/hotel_channel_connector/views/inherited_hotel_virtual_room_availability_views.xml @@ -7,7 +7,7 @@ - + @@ -19,7 +19,7 @@ tree - + diff --git a/hotel_channel_connector/views/inherited_hotel_virtual_room_views.xml b/hotel_channel_connector/views/inherited_hotel_virtual_room_views.xml index 0e8193b74..b87ecd4b9 100644 --- a/hotel_channel_connector/views/inherited_hotel_virtual_room_views.xml +++ b/hotel_channel_connector/views/inherited_hotel_virtual_room_views.xml @@ -6,11 +6,11 @@ - - - + + +
- -
\ No newline at end of file + + diff --git a/hotel_channel_connector/views/inherited_product_pricelist_item_views.xml b/hotel_channel_connector/views/inherited_product_pricelist_item_views.xml index 6ce838576..a37f810dc 100644 --- a/hotel_channel_connector/views/inherited_product_pricelist_item_views.xml +++ b/hotel_channel_connector/views/inherited_product_pricelist_item_views.xml @@ -1,16 +1,16 @@ - + product.pricelist.item - + - - + + - {'readonly': [('wdaily', '=', True)]} + {'readonly': [('is_daily_plan', '=', True)]} diff --git a/hotel_channel_connector/views/inherited_product_pricelist_views.xml b/hotel_channel_connector/views/inherited_product_pricelist_views.xml index 2e7fca25f..ace159618 100644 --- a/hotel_channel_connector/views/inherited_product_pricelist_views.xml +++ b/hotel_channel_connector/views/inherited_product_pricelist_views.xml @@ -7,25 +7,25 @@
-
- - + +
- + product.pricelist - + - -
\ No newline at end of file + + diff --git a/hotel_channel_connector/views/inherited_reservation_restriction_views.xml b/hotel_channel_connector/views/inherited_reservation_restriction_views.xml index fb6407352..a5d64ad8c 100644 --- a/hotel_channel_connector/views/inherited_reservation_restriction_views.xml +++ b/hotel_channel_connector/views/inherited_reservation_restriction_views.xml @@ -7,12 +7,12 @@
-
- - + +
diff --git a/hotel_channel_connector/views/res_config_views.xml b/hotel_channel_connector/views/res_config_views.xml index f2147694c..3f336b368 100644 --- a/hotel_channel_connector/views/res_config_views.xml +++ b/hotel_channel_connector/views/res_config_views.xml @@ -1,12 +1,87 @@ + + + res.config.settings.view.form.inherit.hotel.channel.connector + res.config.settings + + + + +
+

Hotel Parity

+
+
+
+
+
+
+

Hotel Default Hours

+
+
+
+
+
+
+
+
+
+
+
+
+ - WuBook Settings - wubook.config.settings + Channel Settings + res.config.settings -
+