[UPD] use current hotel in JS domain searches

This commit is contained in:
Pablo
2019-08-30 10:23:32 +02:00
parent be9348ce96
commit 3fe9f2e35e
3 changed files with 6 additions and 90 deletions

View File

@@ -69,7 +69,7 @@ return AbstractModel.extend({
},
get_room_types: function() {
var domain = [['hotel_id', '=', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_id', '=', Session.hotel_id]];
return this._rpc({
model: 'hotel.room.type',
method: 'search_read',
@@ -78,7 +78,7 @@ return AbstractModel.extend({
});
},
get_floors: function() {
var domain = [['hotel_ids', 'in', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_ids', 'in', Session.hotel_id]];
return this._rpc({
model: 'hotel.floor',
method: 'search_read',
@@ -87,7 +87,7 @@ return AbstractModel.extend({
});
},
get_amenities: function() {
var domain = [['hotel_ids', 'in', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_ids', 'in', Session.hotel_id]];
return this._rpc({
model: 'hotel.amenity',
method: 'search_read',
@@ -96,7 +96,7 @@ return AbstractModel.extend({
});
},
get_room_type_class: function() {
var domain = [['hotel_ids', 'in', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_ids', 'in', Session.hotel_id]];
return this._rpc({
model: 'hotel.room.type.class',
method: 'search_read',

View File

@@ -40,7 +40,7 @@ return AbstractModel.extend({
},
get_pricelists: function () {
var domain = [['hotel_ids', 'in', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_ids', 'in', Session.hotel_id]];
domain.push(['pricelist_type', '=', 'daily']);
return this._rpc({
model: 'product.pricelist',
@@ -51,7 +51,7 @@ return AbstractModel.extend({
},
get_restrictions: function () {
var domain = [['hotel_id', '=', Session.user_hotels.current_hotel[0]]];
var domain = [['hotel_ids', 'in', Session.hotel_id]];
return this._rpc({
model: 'hotel.room.type.restriction',
method: 'search_read',