mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Configuration reservations color
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||||
<div class="app_settings_block" data-string="Hotel" string="Hotel" data-key="hotel" groups="hotel.group_hotel_manager">
|
<div class="app_settings_block" data-string="Hotel" string="Hotel" data-key="hotel" groups="hotel.group_hotel_manager">
|
||||||
<h2>Hotel Default</h2>
|
<h2 id="default_hotel">Hotel Default</h2>
|
||||||
<div class="row mt16 o_settings_container">
|
<div class="row mt16 o_settings_container">
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
<label for="default_pricelist_id"/>
|
<label for="default_pricelist_id"/>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2>Hotel Default Hours</h2>
|
<h2 id="default_hours">Hotel Default Hours</h2>
|
||||||
<div class="row mt16 o_settings_container">
|
<div class="row mt16 o_settings_container">
|
||||||
<div class="col-xs-12 col-md-12 o_setting_box">
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<label for="tz_hotel"/>
|
<label for="tz_hotel"/>
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
'views/hotel_calendar_management_views.xml',
|
'views/hotel_calendar_management_views.xml',
|
||||||
'views/hotel_calendar_views.xml',
|
'views/hotel_calendar_views.xml',
|
||||||
'data/menus.xml',
|
'data/menus.xml',
|
||||||
|
'views/res_config.xml',
|
||||||
|
'data/ir_config_parameter.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'qweb': [
|
'qweb': [
|
||||||
|
|||||||
86
hotel_calendar/data/ir_config_parameter.xml
Normal file
86
hotel_calendar/data/ir_config_parameter.xml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<openerp>
|
||||||
|
<data noupdate="0">
|
||||||
|
<record id="color_pre_reservation" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_pre_reservation</field>
|
||||||
|
<field name="value">#A24680</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_reservation" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_reservation</field>
|
||||||
|
<field name="value">#7C7BAD</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_reservation_pay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_reservation_pay</field>
|
||||||
|
<field name="value">#584D76</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_stay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_stay</field>
|
||||||
|
<field name="value">#FF4040</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_stay_pay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_stay_pay</field>
|
||||||
|
<field name="value">#82BF07</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_checkout" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_checkout</field>
|
||||||
|
<field name="value">#7E7E7E</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_dontsell" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_dontsell</field>
|
||||||
|
<field name="value">#000000</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_staff" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_staff</field>
|
||||||
|
<field name="value">#C08686</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_to_assign" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_to_assign</field>
|
||||||
|
<field name="value">#ED722E</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_payment_pending" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_payment_pending</field>
|
||||||
|
<field name="value">#A24689</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="color_letter_pre_reservation" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_pre_reservation</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_reservation" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_reservation</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_reservation_pay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_reservation_pay</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_stay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_stay</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_stay_pay" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_stay_pay</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_checkout" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_checkout</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_dontsell" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_dontsell</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_staff" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_staff</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_to_assign" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_to_assign</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
<record id="color_letter_payment_pending" model="ir.config_parameter">
|
||||||
|
<field name="key">hotel_calendar.color_letter_payment_pending</field>
|
||||||
|
<field name="value">#FFFFFF</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
@@ -13,3 +13,4 @@ from . import inherited_product_pricelist_item
|
|||||||
from . import inherited_hotel_folio
|
from . import inherited_hotel_folio
|
||||||
from . import ir_actions_act_window_view
|
from . import ir_actions_act_window_view
|
||||||
from . import ir_ui_view
|
from . import ir_ui_view
|
||||||
|
from . import res_config
|
||||||
|
|||||||
@@ -20,43 +20,42 @@ class HotelReservation(models.Model):
|
|||||||
@api.multi
|
@api.multi
|
||||||
def _generate_color(self):
|
def _generate_color(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|
||||||
reserv_color = '#FFFFFF'
|
reserv_color = '#FFFFFF'
|
||||||
reserv_color_text = '#000000'
|
reserv_color_text = '#000000'
|
||||||
user = self.env.user
|
ICPSudo = self.env['ir.config_parameter'].sudo()
|
||||||
if self.reservation_type == 'staff':
|
if self.reservation_type == 'staff':
|
||||||
reserv_color = user.color_staff
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_staff')
|
||||||
reserv_color_text = user.color_letter_staff
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_staff')
|
||||||
elif self.reservation_type == 'out':
|
elif self.reservation_type == 'out':
|
||||||
reserv_color = user.color_dontsell
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_dontsell')
|
||||||
reserv_color_text = user.color_letter_dontsell
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_dontsell')
|
||||||
elif self.to_assign:
|
elif self.to_assign:
|
||||||
reserv_color = user.color_to_assign
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_to_assign')
|
||||||
reserv_color_text = user.color_letter_to_assign
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_to_assign')
|
||||||
elif self.state == 'draft':
|
elif self.state == 'draft':
|
||||||
reserv_color = user.color_pre_reservation
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_pre_reservation')
|
||||||
reserv_color_text = user.color_letter_pre_reservation
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_pre_reservation')
|
||||||
elif self.state == 'confirm':
|
elif self.state == 'confirm':
|
||||||
if self.folio_id.pending_amount <= 0:
|
if self.folio_id.pending_amount <= 0:
|
||||||
reserv_color = user.color_reservation_pay
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_reservation_pay')
|
||||||
reserv_color_text = user.color_letter_reservation_pay
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_reservation_pay')
|
||||||
else:
|
else:
|
||||||
reserv_color = user.color_reservation
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_reservation')
|
||||||
reserv_color_text = user.color_letter_reservation
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_reservation')
|
||||||
elif self.state == 'booking':
|
elif self.state == 'booking':
|
||||||
if self.folio_id.pending_amount <= 0:
|
if self.folio_id.pending_amount <= 0:
|
||||||
reserv_color = user.color_stay_pay
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_stay_pay')
|
||||||
reserv_color_text = user.color_letter_stay_pay
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_stay_pay')
|
||||||
else:
|
else:
|
||||||
reserv_color = user.color_stay
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_stay')
|
||||||
reserv_color_text = user.color_letter_stay
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_stay')
|
||||||
else:
|
else:
|
||||||
if self.folio_id.pending_amount <= 0:
|
if self.folio_id.pending_amount <= 0:
|
||||||
reserv_color = user.color_checkout
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_checkout')
|
||||||
reserv_color_text = user.color_letter_checkout
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_checkout')
|
||||||
else:
|
else:
|
||||||
reserv_color = user.color_payment_pending
|
reserv_color = ICPSudo.get_param('hotel_calendar.color_payment_pending')
|
||||||
reserv_color_text = user.color_letter_payment_pending
|
reserv_color_text = ICPSudo.get_param('hotel_calendar.color_letter_payment_pending')
|
||||||
return (reserv_color, reserv_color_text)
|
return (reserv_color, reserv_color_text)
|
||||||
|
|
||||||
@api.depends('state', 'reservation_type', 'folio_id.pending_amount', 'to_assign')
|
@api.depends('state', 'reservation_type', 'folio_id.pending_amount', 'to_assign')
|
||||||
|
|||||||
@@ -82,28 +82,6 @@ class ResUsers(models.Model):
|
|||||||
'calendar.event.type',
|
'calendar.event.type',
|
||||||
string="Deny Calander Event Tags")
|
string="Deny Calander Event Tags")
|
||||||
|
|
||||||
color_pre_reservation = fields.Char('Pre-reservation', default='#A24680')
|
|
||||||
color_reservation = fields.Char('Confirmed Reservation ', default='#7C7BAD')
|
|
||||||
color_reservation_pay = fields.Char('Paid Reservation', default='#7C7BAD')
|
|
||||||
color_stay = fields.Char('Checkin', default='#FF4040')
|
|
||||||
color_stay_pay = fields.Char('Paid Checkin', default='#82BF07')
|
|
||||||
color_checkout = fields.Char('Checkout', default='#7E7E7E')
|
|
||||||
color_dontsell = fields.Char('Dont Sell', default='#000000')
|
|
||||||
color_staff = fields.Char('Staff', default='#C08686')
|
|
||||||
color_to_assign = fields.Char('Ota Reservation to Assign', default='#ED722E')
|
|
||||||
color_payment_pending = fields.Char('Payment Pending', default='#A24689')
|
|
||||||
|
|
||||||
color_letter_pre_reservation = fields.Char('Letter Pre-reservation', default='#FFFFFF')
|
|
||||||
color_letter_reservation = fields.Char('Letter Confirmed Reservation ', default='#FFFFFF')
|
|
||||||
color_letter_reservation_pay = fields.Char('Letter Paid Reservation', default='#FFFFFF')
|
|
||||||
color_letter_stay = fields.Char('Letter Checkin', default='#FFFFFF')
|
|
||||||
color_letter_stay_pay = fields.Char('Letter Stay Pay', default='#FFFFFF')
|
|
||||||
color_letter_checkout = fields.Char('Letter Checkout', default='#FFFFFF')
|
|
||||||
color_letter_dontsell = fields.Char('Letter Dont Sell', default='#FFFFFF')
|
|
||||||
color_letter_staff = fields.Char('Letter Staff', default='#FFFFFF')
|
|
||||||
color_letter_to_assign = fields.Char('Letter Ota to Assign', default='#FFFFFF')
|
|
||||||
color_letter_payment_pending = fields.Char('Letter Payment Pending', default='#FFFFFF')
|
|
||||||
|
|
||||||
def __init__(self, pool, cr):
|
def __init__(self, pool, cr):
|
||||||
""" Override of __init__ to add access rights.
|
""" Override of __init__ to add access rights.
|
||||||
Access rights are disabled by default, but allowed on some specific
|
Access rights are disabled by default, but allowed on some specific
|
||||||
@@ -129,26 +107,6 @@ class ResUsers(models.Model):
|
|||||||
'npms_default_num_days',
|
'npms_default_num_days',
|
||||||
'npms_allowed_events_tags',
|
'npms_allowed_events_tags',
|
||||||
'npms_denied_events_tags',
|
'npms_denied_events_tags',
|
||||||
'color_pre_reservation',
|
|
||||||
'color_reservation',
|
|
||||||
'color_reservation_pay',
|
|
||||||
'color_stay',
|
|
||||||
'color_stay_pay',
|
|
||||||
'color_checkout',
|
|
||||||
'color_dontsell',
|
|
||||||
'color_staff',
|
|
||||||
'color_to_assign',
|
|
||||||
'color_payment_pending',
|
|
||||||
'color_letter_pre_reservation',
|
|
||||||
'color_letter_reservation',
|
|
||||||
'color_letter_reservation_pay',
|
|
||||||
'color_letter_stay',
|
|
||||||
'color_letter_stay_pay',
|
|
||||||
'color_letter_checkout',
|
|
||||||
'color_letter_dontsell',
|
|
||||||
'color_letter_staff',
|
|
||||||
'color_letter_to_assign',
|
|
||||||
'color_letter_payment_pending',
|
|
||||||
])
|
])
|
||||||
# duplicate list to avoid modifying the original reference
|
# duplicate list to avoid modifying the original reference
|
||||||
type(self).SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
|
type(self).SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
|
||||||
@@ -169,24 +127,4 @@ class ResUsers(models.Model):
|
|||||||
'npms_default_num_days',
|
'npms_default_num_days',
|
||||||
'npms_allowed_events_tags',
|
'npms_allowed_events_tags',
|
||||||
'npms_denied_events_tags',
|
'npms_denied_events_tags',
|
||||||
'color_pre_reservation',
|
|
||||||
'color_reservation',
|
|
||||||
'color_reservation_pay',
|
|
||||||
'color_stay',
|
|
||||||
'color_stay_pay',
|
|
||||||
'color_checkout',
|
|
||||||
'color_dontsell',
|
|
||||||
'color_staff',
|
|
||||||
'color_to_assign',
|
|
||||||
'color_payment_pending',
|
|
||||||
'color_letter_pre_reservation',
|
|
||||||
'color_letter_reservation',
|
|
||||||
'color_letter_reservation_pay',
|
|
||||||
'color_letter_stay',
|
|
||||||
'color_letter_stay_pay',
|
|
||||||
'color_letter_checkout',
|
|
||||||
'color_letter_dontsell',
|
|
||||||
'color_letter_staff',
|
|
||||||
'color_letter_to_assign',
|
|
||||||
'color_letter_payment_pending',
|
|
||||||
])
|
])
|
||||||
|
|||||||
84
hotel_calendar/models/res_config.py
Normal file
84
hotel_calendar/models/res_config.py
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
# Copyright 2017-2018 Alexandre Díaz
|
||||||
|
# Copyright 2017 Dario Lodeiros
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from openerp import models, fields, api, _
|
||||||
|
from openerp.exceptions import ValidationError
|
||||||
|
|
||||||
|
class HotelConfiguration(models.TransientModel):
|
||||||
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
|
color_pre_reservation = fields.Char('Pre-reservation', default='#A24680')
|
||||||
|
color_reservation = fields.Char('Confirmed Reservation ', default='#7C7BAD')
|
||||||
|
color_reservation_pay = fields.Char('Paid Reservation', default='#584D76')
|
||||||
|
color_stay = fields.Char('Checkin', default='#FF4040')
|
||||||
|
color_stay_pay = fields.Char('Paid Checkin', default='#82BF07')
|
||||||
|
color_checkout = fields.Char('Checkout', default='#7E7E7E')
|
||||||
|
color_dontsell = fields.Char('Dont Sell', default='#000000')
|
||||||
|
color_staff = fields.Char('Staff', default='#C08686')
|
||||||
|
color_to_assign = fields.Char('Ota Reservation to Assign', default='#ED722E')
|
||||||
|
color_payment_pending = fields.Char('Payment Pending', default='#A24689')
|
||||||
|
|
||||||
|
color_letter_pre_reservation = fields.Char('Letter Pre-reservation', default='#FFFFFF')
|
||||||
|
color_letter_reservation = fields.Char('Letter Confirmed Reservation ', default='#FFFFFF')
|
||||||
|
color_letter_reservation_pay = fields.Char('Letter Paid Reservation', default='#FFFFFF')
|
||||||
|
color_letter_stay = fields.Char('Letter Checkin', default='#FFFFFF')
|
||||||
|
color_letter_stay_pay = fields.Char('Letter Stay Pay', default='#FFFFFF')
|
||||||
|
color_letter_checkout = fields.Char('Letter Checkout', default='#FFFFFF')
|
||||||
|
color_letter_dontsell = fields.Char('Letter Dont Sell', default='#FFFFFF')
|
||||||
|
color_letter_staff = fields.Char('Letter Staff', default='#FFFFFF')
|
||||||
|
color_letter_to_assign = fields.Char('Letter Ota to Assign', default='#FFFFFF')
|
||||||
|
color_letter_payment_pending = fields.Char('Letter Payment Pending', default='#FFFFFF')
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def set_values(self):
|
||||||
|
super(HotelConfiguration, self).set_values()
|
||||||
|
ICPSudo = self.env['ir.config_parameter'].sudo()
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_pre_reservation", self.color_pre_reservation)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_reservation", self.color_reservation)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_reservation_pay", self.color_reservation_pay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_stay", self.color_stay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_stay_pay", self.color_stay_pay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_checkout", self.color_checkout)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_dontsell", self.color_dontsell)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_staff", self.color_staff)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_to_assign", self.color_to_assign)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_payment_pending", self.color_payment_pending)
|
||||||
|
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_pre_reservation", self.color_letter_pre_reservation)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_reservation", self.color_letter_reservation)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_reservation_pay", self.color_letter_reservation_pay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_stay", self.color_letter_stay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_stay_pay", self.color_letter_stay_pay)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_checkout", self.color_letter_checkout)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_dontsell", self.color_letter_dontsell)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_staff", self.color_letter_staff)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_to_assign", self.color_letter_to_assign)
|
||||||
|
ICPSudo.set_param("hotel_calendar.color_letter_payment_pending", self.color_letter_payment_pending)
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def get_values(self):
|
||||||
|
res = super(HotelConfiguration, self).get_values()
|
||||||
|
ICPSudo = self.env['ir.config_parameter'].sudo()
|
||||||
|
res.update(
|
||||||
|
color_pre_reservation=ICPSudo.get_param('hotel_calendar.color_pre_reservation', default='#A24680'),
|
||||||
|
color_reservation=ICPSudo.get_param('hotel_calendar.color_reservation', default='#7C7BAD'),
|
||||||
|
color_reservation_pay=ICPSudo.get_param('hotel_calendar.color_reservation_pay', default='#584D76'),
|
||||||
|
color_stay=ICPSudo.get_param('hotel_calendar.color_stay', default='#FF4040'),
|
||||||
|
color_stay_pay=ICPSudo.get_param('hotel_calendar.color_stay_pay', default='#82BF07'),
|
||||||
|
color_checkout=ICPSudo.get_param('hotel_calendar.color_checkout', default='#7E7E7E'),
|
||||||
|
color_dontsell=ICPSudo.get_param('hotel_calendar.color_dontsell', default='#000000'),
|
||||||
|
color_staff=ICPSudo.get_param('hotel_calendar.color_staff', default='#C08686'),
|
||||||
|
color_to_assign=ICPSudo.get_param('hotel_calendar.color_to_assign', default='#ED722E'),
|
||||||
|
color_payment_pending=ICPSudo.get_param('hotel_calendar.color_payment_pending', default='#A24689'),
|
||||||
|
color_letter_pre_reservation=ICPSudo.get_param('hotel_calendar.color_letter_pre_reservation', default='#FFFFFF'),
|
||||||
|
color_letter_reservation=ICPSudo.get_param('hotel_calendar.color_letter_reservation', default='#FFFFFF'),
|
||||||
|
color_letter_reservation_pay=ICPSudo.get_param('hotel.color_letter_reservation_pay', default='#FFFFFF'),
|
||||||
|
color_letter_stay=ICPSudo.get_param('hotel_calendar.color_letter_stay', default='#FFFFFF'),
|
||||||
|
color_letter_stay_pay=ICPSudo.get_param('hotel_calendar.color_letter_stay_pay', default='#FFFFFF'),
|
||||||
|
color_letter_checkout=ICPSudo.get_param('hotel_calendar.color_letter_checkout', default='#FFFFFF'),
|
||||||
|
color_letter_dontsell=ICPSudo.get_param('hotel_calendar.color_letter_dontsell', default='#FFFFFF'),
|
||||||
|
color_letter_staff=ICPSudo.get_param('hotel_calendar.color_letter_staff', default='#FFFFFF'),
|
||||||
|
color_letter_to_assign=ICPSudo.get_param('hotel_calendar.color_letter_to_assign', default='#FFFFFF'),
|
||||||
|
color_letter_payment_pending=ICPSudo.get_param('hotel_calendar.color_letter_payment_pending', default='#FFFFFF'),
|
||||||
|
)
|
||||||
|
return res
|
||||||
@@ -36,40 +36,6 @@
|
|||||||
<field name="npms_denied_events_tags" widget="many2many_tags" />
|
<field name="npms_denied_events_tags" widget="many2many_tags" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="Reservation States Colours" name="reservation_colors" colspan="8">
|
|
||||||
<group>
|
|
||||||
<group colspan="4">
|
|
||||||
<field name="color_pre_reservation" widget="color" />
|
|
||||||
<field name="color_reservation" widget="color" />
|
|
||||||
<field name="color_reservation_pay" widget="color" />
|
|
||||||
<field name="color_stay" widget="color" />
|
|
||||||
<field name="color_stay_pay" widget="color" />
|
|
||||||
</group>
|
|
||||||
<group colspan="4">
|
|
||||||
<field name="color_checkout" widget="color" />
|
|
||||||
<field name="color_dontsell" widget="color" />
|
|
||||||
<field name="color_staff" widget="color" />
|
|
||||||
<field name="color_to_assign" widget="color" />
|
|
||||||
<field name="color_payment_pending" widget="color" />
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<group colspan="4">
|
|
||||||
<field name="color_letter_pre_reservation" widget="color" />
|
|
||||||
<field name="color_letter_reservation" widget="color" />
|
|
||||||
<field name="color_letter_reservation_pay" widget="color" />
|
|
||||||
<field name="color_letter_stay" widget="color" />
|
|
||||||
<field name="color_letter_stay_pay" widget="color" />
|
|
||||||
</group>
|
|
||||||
<group colspan="4">
|
|
||||||
<field name="color_letter_checkout" widget="color" />
|
|
||||||
<field name="color_letter_dontsell" widget="color" />
|
|
||||||
<field name="color_letter_staff" widget="color" />
|
|
||||||
<field name="color_letter_to_assign" widget="color" />
|
|
||||||
<field name="color_letter_payment_pending" widget="color" />
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
63
hotel_calendar/views/res_config.xml
Normal file
63
hotel_calendar/views/res_config.xml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Hotel Settings -->
|
||||||
|
<record id="view_hotel_calendar_config_settings" model="ir.ui.view">
|
||||||
|
<field name="name">res.config.calendar.settings.view.form.inherit.hotel</field>
|
||||||
|
<field name="model">res.config.settings</field>
|
||||||
|
<field name="priority" eval="80"/>
|
||||||
|
<field name="inherit_id" ref="hotel.view_hotel_config_settings"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//h2[@id='default_hours']" position="before">
|
||||||
|
<h2>Calendar Colors</h2>
|
||||||
|
<div class="row mt16 o_settings_container">
|
||||||
|
<div class="row mt16 o_settings_container">
|
||||||
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
|
<div class="text-muted">
|
||||||
|
Set Background Colors
|
||||||
|
</div>
|
||||||
|
<div class="content-group">
|
||||||
|
<div class="mt16">
|
||||||
|
<group>
|
||||||
|
<field name="color_pre_reservation" widget="color" />
|
||||||
|
<field name="color_reservation" widget="color" />
|
||||||
|
<field name="color_reservation_pay" widget="color" />
|
||||||
|
<field name="color_stay" widget="color" />
|
||||||
|
<field name="color_stay_pay" widget="color" />
|
||||||
|
<field name="color_checkout" widget="color" />
|
||||||
|
<field name="color_dontsell" widget="color" />
|
||||||
|
<field name="color_staff" widget="color" />
|
||||||
|
<field name="color_to_assign" widget="color" />
|
||||||
|
<field name="color_payment_pending" widget="color" />
|
||||||
|
</group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
|
<div class="text-muted">
|
||||||
|
Set Letter Colors
|
||||||
|
</div>
|
||||||
|
<div class="content-group">
|
||||||
|
<div class="mt16">
|
||||||
|
<group>
|
||||||
|
<field name="color_letter_pre_reservation" widget="color" />
|
||||||
|
<field name="color_letter_reservation" widget="color" />
|
||||||
|
<field name="color_letter_reservation_pay" widget="color" />
|
||||||
|
<field name="color_letter_stay" widget="color" />
|
||||||
|
<field name="color_letter_stay_pay" widget="color" />
|
||||||
|
<field name="color_letter_checkout" widget="color" />
|
||||||
|
<field name="color_letter_dontsell" widget="color" />
|
||||||
|
<field name="color_letter_staff" widget="color" />
|
||||||
|
<field name="color_letter_to_assign" widget="color" />
|
||||||
|
<field name="color_letter_payment_pending" widget="color" />
|
||||||
|
</group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user