mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Adapt to hotel changes
This commit is contained in:
@@ -113,7 +113,6 @@ class BusHotelCalendar(models.TransientModel):
|
||||
vals['room_type_id']: {
|
||||
date_dt.strftime("%d/%m/%Y"): [
|
||||
vals['avail'],
|
||||
vals['no_ota'],
|
||||
vals['id'],
|
||||
],
|
||||
},
|
||||
|
||||
@@ -40,7 +40,6 @@ class HotelCalendarManagement(models.TransientModel):
|
||||
avail['date'], avail['date'], room_type_id=room_type.id))
|
||||
ravail = min(cavail, room_type.total_rooms_count, int(avail['avail']))
|
||||
vals = {
|
||||
'no_ota': avail['no_ota'],
|
||||
'avail': ravail,
|
||||
}
|
||||
return vals
|
||||
@@ -170,11 +169,20 @@ class HotelCalendarManagement(models.TransientModel):
|
||||
})
|
||||
return json_data
|
||||
|
||||
@api.model
|
||||
def _generate_avalaibility_data(self, room_type, date, avail):
|
||||
return {
|
||||
'id': avail and avail.id or False,
|
||||
'date': avail and avail.date or date,
|
||||
'avail': avail and avail.avail or room_type.total_rooms_count,
|
||||
}
|
||||
|
||||
@api.model
|
||||
def _hcalendar_availability_json_data(self, dfrom, dto):
|
||||
date_start = fields.Date.from_string(dfrom)
|
||||
date_end = fields.Date.from_string(dto)
|
||||
date_diff = abs((date_end - date_start).days) + 1
|
||||
hotel_room_type_avail_obj = self.env['hotel.room.type.availability']
|
||||
room_types = self.env['hotel.room.type'].search([])
|
||||
json_data = {}
|
||||
|
||||
@@ -183,24 +191,12 @@ class HotelCalendarManagement(models.TransientModel):
|
||||
for i in range(0, date_diff):
|
||||
cur_date = date_start + timedelta(days=i)
|
||||
cur_date_str = cur_date.strftime(DEFAULT_SERVER_DATE_FORMAT)
|
||||
avail = self.env['hotel.room.type.availability'].search([
|
||||
avail = hotel_room_type_avail_obj.search([
|
||||
('date', '=', cur_date_str),
|
||||
('room_type_id', '=', room_type.id)
|
||||
])
|
||||
if avail:
|
||||
json_data[room_type.id].append({
|
||||
'id': avail.id,
|
||||
'date': avail.date,
|
||||
'avail': avail.avail,
|
||||
'no_ota': avail.no_ota,
|
||||
})
|
||||
else:
|
||||
json_data[room_type.id].append({
|
||||
'id': False,
|
||||
'date': cur_date_str,
|
||||
'avail': room_type.total_rooms_count,
|
||||
'no_ota': False,
|
||||
})
|
||||
json_data[room_type.id].append(
|
||||
self._generate_avalaibility_data(room_type, cur_date_str, avail))
|
||||
return json_data
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -6,16 +6,20 @@ from odoo import models, fields, api
|
||||
class HotelRoomTypeAvailability(models.Model):
|
||||
_inherit = 'hotel.room.type.availability'
|
||||
|
||||
def _prepare_notif_values(self, record):
|
||||
return {
|
||||
'date': record.date,
|
||||
'avail': record.avail,
|
||||
'room_type_id': record.room_type_id.id,
|
||||
'id': record.id,
|
||||
}
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
res = super(HotelRoomTypeAvailability, self).create(vals)
|
||||
self.env['bus.hotel.calendar'].send_availability_notification({
|
||||
'date': res.date,
|
||||
'avail': res.avail,
|
||||
'no_ota': res.no_ota,
|
||||
'room_type_id': res.room_type_id.id,
|
||||
'id': res.id,
|
||||
})
|
||||
self.env['bus.hotel.calendar'].send_availability_notification(
|
||||
self._prepare_notif_values(res)
|
||||
)
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
@@ -23,13 +27,9 @@ class HotelRoomTypeAvailability(models.Model):
|
||||
ret_vals = super(HotelRoomTypeAvailability, self).write(vals)
|
||||
bus_hotel_calendar_obj = self.env['bus.hotel.calendar']
|
||||
for record in self:
|
||||
bus_hotel_calendar_obj.send_availability_notification({
|
||||
'date': record.date,
|
||||
'avail': record.avail,
|
||||
'no_ota': record.no_ota,
|
||||
'room_type_id': record.room_type_id.id,
|
||||
'id': record.id,
|
||||
})
|
||||
bus_hotel_calendar_obj.send_availability_notification(
|
||||
self._prepare_notif_values(record)
|
||||
)
|
||||
return ret_vals
|
||||
|
||||
@api.multi
|
||||
@@ -37,13 +37,9 @@ class HotelRoomTypeAvailability(models.Model):
|
||||
# Construct dictionary with relevant info of removed records
|
||||
unlink_vals = []
|
||||
for record in self:
|
||||
unlink_vals.append({
|
||||
'date': record.date,
|
||||
'avail': record.room_type_id.total_rooms_count,
|
||||
'room_type_id': record.room_type_id.id,
|
||||
'no_ota': False,
|
||||
'id': record.id,
|
||||
})
|
||||
unlink_vals.append(
|
||||
self._prepare_notif_values(record)
|
||||
)
|
||||
res = super(HotelRoomTypeAvailability, self).unlink()
|
||||
bus_hotel_calendar_obj = self.env['bus.hotel.calendar']
|
||||
for uval in unlink_vals:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_hotel_calendar_management_mpms">
|
||||
<record model="ir.ui.view" id="hotel_calendar_management_view_mpms">
|
||||
<field name="name">hotel.calendar.management.mpms</field>
|
||||
<field name="model">hotel.calendar.management</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_pms">
|
||||
<record model="ir.ui.view" id="hotel_reservation_view_pms">
|
||||
<field name="name">hotel.reservation.pms</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<record id="room_type_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_room_type_form" />
|
||||
<field name="inherit_id" ref="hotel.hotel_room_type_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="hcal_sequence" />
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="room_view_form" model="ir.ui.view">
|
||||
<record id="hotel_room_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.room</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_room_form" />
|
||||
<field name="inherit_id" ref="hotel.hotel_room_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_title')]" position="inside">
|
||||
<field name="hcal_sequence" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_users_form" model="ir.ui.view">
|
||||
<record id="res_users_view_form" model="ir.ui.view">
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Calendar Settings -->
|
||||
<record id="view_hotel_config_settings" model="ir.ui.view">
|
||||
<record id="hotel_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.hotel</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="80"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Form view of hotel room -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_pricelist_cached_form">
|
||||
<record model="ir.ui.view" id="hotel_room_pricelist_cached_view_form">
|
||||
<field name="name">hotel.room.pricelist.cached.form</field>
|
||||
<field name="model">room.pricelist.cached</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -19,7 +19,7 @@
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_pricelist_cached_tree">
|
||||
<record model="ir.ui.view" id="hotel_room_pricelist_cached_view_tree">
|
||||
<field name="name">hotel.room.pricelist.cached.tree</field>
|
||||
<field name="model">room.pricelist.cached</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Copyright 2018 Alexandre Díaz <dev@redneboa.es>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from datetime import datetime
|
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||
from openerp import models, api
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||
from odoo import models, api
|
||||
from odoo.addons.hotel_calendar.controllers.bus import HOTEL_BUS_CHANNEL_ID
|
||||
|
||||
|
||||
@@ -30,15 +30,21 @@ class BusHotelCalendar(models.TransientModel):
|
||||
def _generate_reservation_notif(self, vals):
|
||||
json = super(BusHotelCalendar, self)._generate_reservation_notif(vals)
|
||||
json['reservation'].update({
|
||||
'wrid': vals['wrid'],
|
||||
'external_id': vals['external_id'],
|
||||
})
|
||||
return json
|
||||
|
||||
@api.model
|
||||
def send_issue_notification(self, ntype, title, issue_id, section,
|
||||
message):
|
||||
notif = self._generate_issue_notification(ntype, title, issue_id,
|
||||
section, message)
|
||||
def _generate_availability_notification(self, vals):
|
||||
date_dt = datetime.strptime(vals['date'], DEFAULT_SERVER_DATE_FORMAT)
|
||||
json = super(BusHotelCalendar, self)._generate_availability_notification(vals)
|
||||
json['availability'][vals['room_type_id']][date_dt.strftime("%d/%m/%Y")].append(
|
||||
vals['no_ota'])
|
||||
return json
|
||||
|
||||
@api.model
|
||||
def send_issue_notification(self, ntype, title, issue_id, section, message):
|
||||
notif = self._generate_issue_notification(ntype, title, issue_id, section, message)
|
||||
self.env['bus.bus'].sendone(
|
||||
(self._cr.dbname, 'hotel.reservation',
|
||||
HOTEL_BUS_CHANNEL_ID), notif)
|
||||
(self._cr.dbname, 'hotel.reservation',
|
||||
HOTEL_BUS_CHANNEL_ID), notif)
|
||||
|
||||
@@ -10,7 +10,20 @@ class HotelCalendarManagement(models.TransientModel):
|
||||
def _get_availability_values(self, avail, room_type):
|
||||
vals = super(HotelCalendarManagement, self)._get_availability_values(
|
||||
avail, room_type)
|
||||
vals.update({'wmax_avail': vals['avail']})
|
||||
vals.update({
|
||||
'wmax_avail': vals['avail'],
|
||||
'no_ota': vals['no_ota'],
|
||||
'booked': vals['booked'],
|
||||
})
|
||||
return vals
|
||||
|
||||
@api.model
|
||||
def _generate_avalaibility_data(self, room_type, date, avail):
|
||||
vals = super(HotelCalendarManagement, self)._generate_avalaibility_data(
|
||||
room_type, date, avail)
|
||||
vals.update({
|
||||
'no_ota': avail and avail.no_ota or False,
|
||||
})
|
||||
return vals
|
||||
|
||||
@api.multi
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
|
||||
<!-- Tree view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_toassign_reservation_tree">
|
||||
<record model="ir.ui.view" id="hotel_toassign_reservation_view_tree">
|
||||
<field name="name">hotel.toassign.reservation.tree</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<record id="hotel_reservation_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_reservation_form" />
|
||||
<field name="inherit_id" ref="hotel.hotel_reservation_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='unify']" position="after">
|
||||
<button name="mark_as_readed" string="Mark as Read"
|
||||
|
||||
@@ -28,8 +28,6 @@ class ChannelHotelRoomTypeAvailability(models.Model):
|
||||
string='Pricelist',
|
||||
required=True,
|
||||
ondelete='cascade')
|
||||
no_ota = fields.Boolean('No OTA', default=False)
|
||||
booked = fields.Boolean('Booked', default=False, readonly=True)
|
||||
channel_max_avail = fields.Integer("Max. Channel Avail",
|
||||
default=_default_channel_max_avail,
|
||||
old_name='wmax_avail')
|
||||
@@ -95,6 +93,16 @@ class HotelRoomTypeAvailability(models.Model):
|
||||
inverse_name='odoo_id',
|
||||
string='Hotel Room Type Availability Connector Bindings')
|
||||
|
||||
no_ota = fields.Boolean('No OTA', default=False)
|
||||
booked = fields.Boolean('Booked', default=False, readonly=True)
|
||||
|
||||
def _prepare_notif_values(self, record):
|
||||
vals = super(HotelRoomTypeAvailability, self)._prepare_notif_values()
|
||||
vals.update({
|
||||
'no_ota': record.no_ota,
|
||||
})
|
||||
return vals
|
||||
|
||||
@api.constrains('avail')
|
||||
def _check_avail(self):
|
||||
room_type_obj = self.env['hotel.room.type']
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_backend_form" model="ir.ui.view">
|
||||
<record id="channel_backend_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.backend.form</field>
|
||||
<field name="model">channel.backend</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -181,7 +181,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_backend_tree" model="ir.ui.view">
|
||||
<record id="channel_backend_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.backend.tree</field>
|
||||
<field name="model">channel.backend</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_hotel_reservation_form" model="ir.ui.view">
|
||||
<record id="channel_hotel_reservation_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.reservation.form</field>
|
||||
<field name="model">channel.hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_hotel_room_type_availability_form" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_availability_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.availability.form</field>
|
||||
<field name="model">channel.hotel.room.type.availability</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -10,6 +10,10 @@
|
||||
<field name="id" invisible="1" />
|
||||
<field name="backend_id" attrs="{'visible': [('id','=', False)]}" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="no_ota" />
|
||||
<field name="booked" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="channel_max_avail" />
|
||||
<field name="channel_pushed" />
|
||||
@@ -18,7 +22,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_hotel_room_type_availability_tree" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_availability_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.availability.tree</field>
|
||||
<field name="model">channel.hotel.room.type.availability</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_hotel_room_type_restriction_item_form" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_restriction_item_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.restriction.item.form</field>
|
||||
<field name="model">channel.hotel.room.type.restriction.item</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -17,7 +17,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_hotel_room_type_restriction_item_tree" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_restriction_item_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.restriction.item.tree</field>
|
||||
<field name="model">channel.hotel.room.type.restriction.item</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_hotel_room_type_restriction_form" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_restriction_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.restriction.form</field>
|
||||
<field name="model">channel.hotel.room.type.restriction</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -17,7 +17,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_hotel_room_type_restriction_tree" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_restriction_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.restriction.tree</field>
|
||||
<field name="model">channel.hotel.room.type.restriction</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_hotel_room_type_form" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.form</field>
|
||||
<field name="model">channel.hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -19,7 +19,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_hotel_room_type_tree" model="ir.ui.view">
|
||||
<record id="channel_hotel_room_type_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.room.type.tree</field>
|
||||
<field name="model">channel.hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<odoo>
|
||||
|
||||
<!-- Form view -->
|
||||
<record model="ir.ui.view" id="view_hotel_channel_connector_ota_info_form">
|
||||
<record model="ir.ui.view" id="hotel_channel_connector_ota_info_view_form">
|
||||
<field name="name">channel.ota.info.form</field>
|
||||
<field name="model">channel.ota.info</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -23,7 +23,7 @@
|
||||
</record>
|
||||
|
||||
<!-- Tree view -->
|
||||
<record model="ir.ui.view" id="view_hotel_channel_connector_ota_info_tree">
|
||||
<record model="ir.ui.view" id="hotel_channel_connector_ota_info_view_tree">
|
||||
<field name="name">channel.ota.info.tree</field>
|
||||
<field name="model">channel.ota.info</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_product_pricelist_item_form" model="ir.ui.view">
|
||||
<record id="channel_product_pricelist_item_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.product.pricelist.item.form</field>
|
||||
<field name="model">channel.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -14,7 +14,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_hotel_product_pricelist_item_tree" model="ir.ui.view">
|
||||
<record id="channel_hotel_product_pricelist_item_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.product.pricelist.item.tree</field>
|
||||
<field name="model">channel.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_channel_product_pricelist_form" model="ir.ui.view">
|
||||
<record id="channel_product_pricelist_view_form" model="ir.ui.view">
|
||||
<field name="name">channel.product.pricelist.form</field>
|
||||
<field name="model">channel.product.pricelist</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -18,7 +18,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_channel_product_pricelist_tree" model="ir.ui.view">
|
||||
<record id="channel_product_pricelist_view_tree" model="ir.ui.view">
|
||||
<field name="name">channel.hotel.product.pricelist.tree</field>
|
||||
<field name="model">channel.product.pricelist</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<record id="hotel_reservation_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_reservation_form" />
|
||||
<field name="inherit_id" ref="hotel.hotel_reservation_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='channel_type']" position="after">
|
||||
<!-- field name="channel_reservation_id" attrs='{"readonly": [("able_to_modify_channel","=",False)], "invisible":[("channel_type","!=", "web")]}' string="OTA"/-->
|
||||
@@ -61,7 +61,7 @@
|
||||
<!-- Tree view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_tree">
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_reservation_tree" />
|
||||
<field name="inherit_id" ref="hotel.hotel_reservation_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='checkout']" position="after">
|
||||
<field name="origin_sale"/>
|
||||
@@ -70,9 +70,9 @@
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_search">
|
||||
<record model="ir.ui.view" id="hotel_reservation_view_search">
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_reservation_search" />
|
||||
<field name="inherit_id" ref="hotel.hotel_reservation_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='folio_id']" position="after">
|
||||
<!-- field name="wchannel_reservation_code"/-->
|
||||
@@ -85,7 +85,7 @@
|
||||
</record>
|
||||
|
||||
<!--graph view of hotel reservation -->
|
||||
<record id="view_hotel_reservation_graph" model="ir.ui.view">
|
||||
<record id="hotel_reservation_view_graph" model="ir.ui.view">
|
||||
<field name="name">view.hotel.reservation.graph</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -97,7 +97,7 @@
|
||||
</record>
|
||||
|
||||
<!--pivot view of hotel reservation -->
|
||||
<record id="view_hotel_pivot_graph" model="ir.ui.view">
|
||||
<record id="hotel_reservation_view_pivot_graph" model="ir.ui.view">
|
||||
<field name="name">view.hotel.pivot.graph</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="room_type_restriction_item_view" model="ir.ui.view">
|
||||
<record id="room_type_restriction_item_view_from" model="ir.ui.view">
|
||||
<field name="model">hotel.room.type.restriction.item</field>
|
||||
<field name="inherit_id" ref="hotel.room_type_restriction_item_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="room_type_restriction_view" model="ir.ui.view">
|
||||
<record id="room_type_restriction_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.room.type.restriction</field>
|
||||
<field name="inherit_id" ref="hotel.room_type_restriction_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<record id="room_type_view_form" model="ir.ui.view">
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="inherit_id" ref="hotel.view_hotel_room_type_form" />
|
||||
<field name="inherit_id" ref="hotel.hotel_room_type_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<notebook>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_pricelist_view" model="ir.ui.view">
|
||||
<record id="product_pricelist_view_form" model="ir.ui.view">
|
||||
<field name="model">product.pricelist</field>
|
||||
<field name="inherit_id" ref="product.product_pricelist_view" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<record id="res_partner_view_form" model="ir.ui.view">
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
Reference in New Issue
Block a user