mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Calendar Issues
This commit is contained in:
@@ -366,7 +366,6 @@ var PMSCalendarController = AbstractController.extend({
|
||||
}).on('hide.bs.collapse', function(ev){
|
||||
self.renderer.$el.find('#pms-menu .menu-filter-box h4 i.fa').css({transform: 'rotate(0deg)'});
|
||||
});
|
||||
|
||||
this._multi_calendar.on('tab_changed', function(ev, active_index){
|
||||
if (active_index) {
|
||||
self._refresh_view_options(active_index);
|
||||
@@ -856,25 +855,25 @@ var PMSCalendarController = AbstractController.extend({
|
||||
now_fmt = moment().format(HotelConstants.ODOO_DATE_MOMENT_FORMAT);
|
||||
|
||||
var domain_checkouts = [
|
||||
['checkout', '=', now_fmt],
|
||||
['real_checkout', '=', now_fmt],
|
||||
['state', 'in', ['booking']],
|
||||
['reservation_type', 'not in', ['out']]
|
||||
];
|
||||
var domain_checkins = [
|
||||
['checkin', '=', now_fmt],
|
||||
['real_checkin', '=', now_fmt],
|
||||
['state', 'in', ['confirm']],
|
||||
['reservation_type', 'not in', ['out']]
|
||||
];
|
||||
var domain_overbookings = [
|
||||
['checkin', '>=', dfrom_fmt],
|
||||
['real_checkin', '>=', dfrom_fmt],
|
||||
['overbooking', '=', true], ['state', 'not in', ['cancelled']]
|
||||
];
|
||||
var domain_cancelled = [
|
||||
'|', '&',
|
||||
['checkout', '>', dfrom_fmt],
|
||||
['checkout', '<', dto_fmt],
|
||||
['checkin', '>=', dfrom_fmt],
|
||||
['checkin', '<=', dto_fmt],
|
||||
['real_checkout', '>', dfrom_fmt],
|
||||
['real_checkout', '<', dto_fmt],
|
||||
['real_checkin', '>=', dfrom_fmt],
|
||||
['real_checkin', '<=', dto_fmt],
|
||||
['state', '=', 'cancelled']
|
||||
];
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('checkin','=', datetime.datetime.now().strftime('%Y-%m-%d'),
|
||||
('state', 'in', ('confirm')),
|
||||
('reservation_type', 'not in', ('out')))]</field>
|
||||
<field name="domain">[('real_checkin','=', datetime.datetime.now().strftime('%Y-%m-%d')),
|
||||
('state', 'in', ['confirm']),
|
||||
('reservation_type', 'not in', ['out'])]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="hotel_reservation_action_checkout">
|
||||
@@ -16,9 +16,9 @@
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('checkout','=', datetime.datetime.now().strftime('%Y-%m-%d'),
|
||||
('state', 'in', ('booking')),
|
||||
('reservation_type', 'not in', ('out')))]</field>
|
||||
<field name="domain">[('real_checkout','=', datetime.datetime.now().strftime('%Y-%m-%d')),
|
||||
('state', 'in', ['booking']),
|
||||
('reservation_type', 'not in', ['out'])]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="hotel_calendar_action_form_tree">
|
||||
|
||||
@@ -35,9 +35,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pms-menu #btn_channel_manager_request.incoming i {
|
||||
#pms-menu #btn_channel_manager_request .incoming i {
|
||||
animation-name: channel-manager-changes;
|
||||
animation-duration: 2s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#pms-menu #btn_channel_manager_request .button-highlight {
|
||||
color: white;
|
||||
background-color: #FFA500;
|
||||
}
|
||||
|
||||
#pms-menu #btn_channel_manager_request .button-highlight i {
|
||||
color: white;
|
||||
}
|
||||
@@ -87,6 +87,12 @@ var PMSHotelCalendarController = PMSCalendarController.include({
|
||||
this._super(notifications);
|
||||
},
|
||||
|
||||
_refresh_view_options: function(active_index) {
|
||||
/* btn_channel_manager_request */
|
||||
this._super(active_index);
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
return PMSHotelCalendarController;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="hotel_toassign_reservation_view_tree" />
|
||||
<field name="domain">[('to_assign','=',True),('to_read','=',True)]</field>
|
||||
<field name="domain">[('to_read','=',True)]</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -6,61 +6,11 @@
|
||||
<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="inherit_id" ref="hotel.hotel_reservation_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Reservation"
|
||||
decoration-muted="state == 'cancelled' and not overbooking"
|
||||
decoration-warning="overbooking"
|
||||
>
|
||||
<!--button icon="fa fa-2x fa-thumb-tack"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
id="mark_readed"
|
||||
name="mark_as_readed"
|
||||
attrs="{'invisible':[('to_read','=', False)]}"
|
||||
help="Mark as Read"
|
||||
/>
|
||||
<button icon="fa fa-1x fa-chain-broken"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
id="splitted"
|
||||
name="open_master"
|
||||
attrs="{'invisible':[('splitted','=', False)]}"
|
||||
/-->
|
||||
<field name="state" />
|
||||
<!--button type="object" class="oe_stat_button"
|
||||
id="go_folio" icon="fa fa-2x fa-file"
|
||||
name="open_folio"
|
||||
/-->
|
||||
<!--field name="folio_id"/>
|
||||
<field name="room_id" string="Room"/-->
|
||||
<!--button type="action" class="oe_stat_button"
|
||||
id="reservations_partner" icon="fa fa-2x fa-list-ul"
|
||||
name="%(hotel.open_hotel_reservation_form_tree_all)d"
|
||||
context="{'search_default_partner_id': partner_id}"
|
||||
/-->
|
||||
<!--field name="partner_id"/>
|
||||
<field name="splitted" invisible="1" />
|
||||
<field name="parent_reservation" invisible="1" />
|
||||
<field name="room_type_id" string="Reserved Room Type"/>
|
||||
<field name="nights" />
|
||||
<field name="room_type_id" position="after">
|
||||
<field name="to_read" invisible="1"/>
|
||||
<field name="adults" string="Persons"/>
|
||||
<field name="checkin" widget="date"/>
|
||||
<field name="checkout" widget="date"/>
|
||||
<field name="create_date"/>
|
||||
<field name="overbooking" invisible="1" />
|
||||
<field name="last_updated_res" string="Updated on"/-->
|
||||
<field name="overbooking" invisible="1" />
|
||||
<!--field name="to_assign" invisible="1"/>
|
||||
<field name="discount" groups="sale.group_discount_per_so_line"/>
|
||||
<field name="price_total" string="Final Price"/>
|
||||
<field name="folio_pending_amount" string="Folio Pending Amount"/-->
|
||||
<!--button type="object" class="oe_stat_button"
|
||||
id="checkin_partner_smart_button" icon="fa fa-3x fa-money"
|
||||
name="action_pay_folio"
|
||||
attrs="{'invisible':[('folio_pending_amount','==',0)]}"
|
||||
/-->
|
||||
</tree>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user