Merge branch '11.0' of https://github.com/hootel/hootel into 11.0

This commit is contained in:
Dario Lodeiros
2019-05-03 13:43:25 +02:00
3 changed files with 7 additions and 4 deletions

View File

@@ -164,8 +164,7 @@ return AbstractModel.extend({
},
save_changes: function(params) {
//params.splice(0, 0, false); // FIXME: ID=False because first parameter its an integer
//console.log(params);
params.splice(0, 0, false); // FIXME: ID=False because first parameter its an integer
return this._rpc({
model: 'hotel.calendar.management',
method: 'save_changes',

View File

@@ -227,6 +227,10 @@ var HotelCalendarView = AbstractRenderer.extend({
['partner_id.vat', 'ilike', tsearch],
['partner_id.email', 'ilike', tsearch],
['partner_id.phone', 'ilike', tsearch]);
if (type === 'invoice') {
domain.splice(0, 0, '|');
domain.push(['number', 'ilike', tsearch]);
}
return domain;
},
@@ -240,7 +244,7 @@ var HotelCalendarView = AbstractRenderer.extend({
model = 'hotel.checkin.partner';
title = _t('Checkins');
} else if (type === 'invoice') {
model = 'sale.order';
model = 'account.invoice';
title = _t('Invoices');
} else if (type === 'folio') {
model = 'hotel.folio'

View File

@@ -40,7 +40,7 @@ odoo.define('hotel_calendar_channel_connector.PMSHotelCalendarRenderer', functio
},
_generate_search_domain: function(tsearch, type) {
var domain = this._super(tsearch);
var domain = this._super(tsearch, type);
if (type === 'book') {
domain.splice(0, 0, '|');