mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Merge current work on 11.0
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
'views/inherited_hotel_room_type_views.xml',
|
||||
'views/inherited_hotel_room_views.xml',
|
||||
'views/room_pricelist_cached_views.xml',
|
||||
'views/hotel_reservation_views.xml',
|
||||
'views/hotel_calendar_management_views.xml',
|
||||
'data/views.xml',
|
||||
'data/menus.xml',
|
||||
'data/records.xml',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<field name="name">Hotel Calendar</field>
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="view_mode">pms</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<record id="action_hotel_calendar_management" model="ir.actions.act_window">
|
||||
@@ -21,7 +22,7 @@
|
||||
web_icon="hotel_calendar,static/description/icon_calendar_configurator.png"
|
||||
action="action_hotel_calendar_management" groups="hotel.group_hotel_manager" />
|
||||
|
||||
<menuitem id="hotel_virtual_room_pricelist_cached" name="VRoom Pricelist Cached"
|
||||
sequence="1" action="hotel_virtual_room_pricelist_cached_action_form_tree" parent="sale.menu_sale_config"/>
|
||||
<menuitem id="hotel_room_pricelist_cached" name="Room Pricelist Cached"
|
||||
sequence="1" action="hotel_room_pricelist_cached_action_form_tree" parent="sale.menu_sale_config"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -5,4 +5,4 @@ from odoo import models, fields
|
||||
class ActWindowView(models.Model):
|
||||
_inherit = 'ir.actions.act_window.view'
|
||||
|
||||
view_mode = fields.Selection(selection_add=[('pms', "PMS")])
|
||||
view_mode = fields.Selection(selection_add=[('pms', "PMS"), ('mpms', 'Management PMS')])
|
||||
|
||||
@@ -5,4 +5,4 @@ from odoo import models, fields
|
||||
class View(models.Model):
|
||||
_inherit = 'ir.ui.view'
|
||||
|
||||
type = fields.Selection(selection_add=[('pms', "PMS")])
|
||||
type = fields.Selection(selection_add=[('pms', "PMS"), ('mpms', 'Management PMS')])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_virtual_price_cache_user,hotel_calendar.model_virtual_room_pricelist_cached_user,hotel_calendar.model_virtual_room_pricelist_cached,hotel.group_hotel_user,1,1,1,1
|
||||
access_virtual_price_cache_call,hotel_calendar.model_virtual_room_pricelist_cached_call,hotel_calendar.model_virtual_room_pricelist_cached,hotel.group_hotel_call,1,1,1,1
|
||||
access_room_price_cache_user,hotel_calendar.model_room_pricelist_cached_user,hotel_calendar.model_room_pricelist_cached,hotel.group_hotel_user,1,1,1,1
|
||||
access_room_price_cache_call,hotel_calendar.model_room_pricelist_cached_call,hotel_calendar.model_room_pricelist_cached,hotel.group_hotel_call,1,1,1,1
|
||||
access_hotel_product_pricelist_item_call,hotel_calendar.pricelist_item_call,hotel_calendar.model_product_pricelist_item,hotel.group_hotel_call,1,1,1,1
|
||||
access_hotel_product_pricelist_item_user,hotel_calendar.pricelist_item_use,hotel_calendar.model_product_pricelist_item,hotel.group_hotel_user,1,1,1,1
|
||||
|
||||
|
@@ -205,6 +205,7 @@ var PMSCalendarView = AbstractView.extend({
|
||||
|
||||
SystrayMenu.Items.push(CalendarMenu);
|
||||
ViewRegistry.add('pms', PMSCalendarView);
|
||||
//Core.view_registry.add('pms', HotelCalendarView);
|
||||
|
||||
return PMSCalendarView;
|
||||
|
||||
|
||||
12
hotel_calendar/views/hotel_calendar_management_views.xml
Normal file
12
hotel_calendar/views/hotel_calendar_management_views.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_hotel_calendar_management_mpms">
|
||||
<field name="name">hotel.calendar.management.mpms</field>
|
||||
<field name="model">hotel.calendar.management</field>
|
||||
<field name="arch" type="xml">
|
||||
<mpms></mpms>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
12
hotel_calendar/views/hotel_reservation_views.xml
Normal file
12
hotel_calendar/views/hotel_reservation_views.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_pms">
|
||||
<field name="name">hotel.reservation.pms</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
<pms></pms>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
6
hotel_channel_connector/backend.py
Normal file
6
hotel_channel_connector/backend.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import openerp.addons.connector.backend as backend
|
||||
|
||||
|
||||
wubook = backend.Backend('wubook')
|
||||
# version 1.2
|
||||
wubook_1_2_0_0 = backend.Backend(parent=wubook, version='1.2')
|
||||
@@ -8,6 +8,7 @@ from odoo.tools import (
|
||||
DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
from odoo.addons.payment.models.payment_acquirer import _partner_split_name
|
||||
from odoo.addons.hotel import date_utils
|
||||
from odoo import fields
|
||||
|
||||
# GLOBAL VARS
|
||||
DEFAULT_WUBOOK_DATE_FORMAT = "%d/%m/%Y"
|
||||
@@ -81,10 +82,20 @@ class WuBookServer(object):
|
||||
self._server = None
|
||||
|
||||
class HotelChannelInterfaceAdapter(AbstractComponent):
|
||||
_name = 'hotel.channel.interface.adapter'
|
||||
_name = 'hotel.channel.adapter'
|
||||
_inherit = ['base.backend.adapter', 'base.hotel.channel.connector']
|
||||
_usage = 'backend.adapter'
|
||||
|
||||
def _select_versions(self):
|
||||
return [
|
||||
('1.2', '1.2'),
|
||||
]
|
||||
version = fields.Selection(
|
||||
selection='_select_versions',
|
||||
string='Version',
|
||||
required=True,
|
||||
)
|
||||
|
||||
def create_room(self, shortcode, name, capacity, price, availability):
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -191,7 +202,7 @@ class HotelChannelInterfaceAdapter(AbstractComponent):
|
||||
|
||||
class WuBookAdapter(AbstractComponent):
|
||||
_name = 'wubook.adapter'
|
||||
_inherit = 'hotel.channel.interface.adapter'
|
||||
_inherit = 'hotel.channel.adapter'
|
||||
|
||||
# === ROOMS
|
||||
def create_room(self, shortcode, name, capacity, price, availability):
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
##############################################################################
|
||||
from openerp.exceptions import ValidationError
|
||||
from openerp import models, fields, api, _
|
||||
from ..wubook import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
from ..components.backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
|
||||
|
||||
class ImportAvailabilityWizard(models.TransientModel):
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
from openerp.exceptions import ValidationError
|
||||
from openerp import models, fields, api, _
|
||||
from odoo.addons.hotel import date_utils
|
||||
from ..wubook import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
from ..components.backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
|
||||
|
||||
class ImportPlanPricesWizard(models.TransientModel):
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
from openerp.exceptions import ValidationError
|
||||
from openerp import models, fields, api, _
|
||||
from odoo.addons.hotel import date_utils
|
||||
from ..wubook import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
from ..components.backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
|
||||
|
||||
class ImportPlanRestrictionsWizard(models.TransientModel):
|
||||
|
||||
@@ -23,7 +23,7 @@ import os
|
||||
import binascii
|
||||
from openerp import models, fields, api, _
|
||||
from openerp.exceptions import ValidationError
|
||||
from ..wubook import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
from ..components.backend_adapter import DEFAULT_WUBOOK_DATE_FORMAT
|
||||
from odoo.addons.hotel import date_utils
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user