mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[UPD] get filters by hotel
This commit is contained in:
@@ -78,7 +78,10 @@ return AbstractModel.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
get_floors: function() {
|
get_floors: function() {
|
||||||
var domain = [['hotel_ids', 'in', Session.hotel_id]];
|
var domain = [('|',
|
||||||
|
['hotel_ids', 'in', Session.hotel_id],
|
||||||
|
['hotel_ids', '=', false]
|
||||||
|
)];
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: 'hotel.floor',
|
model: 'hotel.floor',
|
||||||
method: 'search_read',
|
method: 'search_read',
|
||||||
@@ -87,7 +90,11 @@ return AbstractModel.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
get_amenities: function() {
|
get_amenities: function() {
|
||||||
var domain = [['hotel_ids', 'in', Session.hotel_id]];
|
var domain = [('|',
|
||||||
|
['hotel_ids', 'in', Session.hotel_id],
|
||||||
|
['hotel_ids', '=', false]
|
||||||
|
)];
|
||||||
|
// TODO: Filter rooms by amenities is not working
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: 'hotel.amenity',
|
model: 'hotel.amenity',
|
||||||
method: 'search_read',
|
method: 'search_read',
|
||||||
@@ -96,7 +103,10 @@ return AbstractModel.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
get_room_type_class: function() {
|
get_room_type_class: function() {
|
||||||
var domain = [['hotel_ids', 'in', Session.hotel_id]];
|
var domain = [('|',
|
||||||
|
['hotel_ids', 'in', Session.hotel_id],
|
||||||
|
['hotel_ids', '=', false]
|
||||||
|
)];
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
model: 'hotel.room.type.class',
|
model: 'hotel.room.type.class',
|
||||||
method: 'search_read',
|
method: 'search_read',
|
||||||
|
|||||||
Reference in New Issue
Block a user