[WIP] retrieve data in calendar by product.pricelist and hotel

This commit is contained in:
Pablo
2019-08-22 20:15:36 +02:00
parent 0df9a27fcd
commit 42a53dfd26
8 changed files with 26 additions and 12 deletions

View File

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