mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[UPD] use current hotel in JS domain searches
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user