mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP][FIX] Calendar
This commit is contained in:
@@ -108,10 +108,9 @@ class HotelReservation(models.Model):
|
||||
date_start = date_utils.get_datetime(dfrom, hours=False) \
|
||||
- timedelta(days=1)
|
||||
date_start_str = date_start.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
room_product_ids = rooms.mapped('product_id.id')
|
||||
reservations_raw = self.env['hotel.reservation'].search(
|
||||
[
|
||||
('product_id', 'in', room_product_ids),
|
||||
('room_id', 'in', rooms.ids),
|
||||
('state', 'in',
|
||||
['draft', 'confirm', 'booking', 'done', False]),
|
||||
],
|
||||
@@ -141,7 +140,7 @@ class HotelReservation(models.Model):
|
||||
vrooms = self.env['hotel.room.type'].search(
|
||||
[],
|
||||
order='hcal_sequence ASC')
|
||||
vroom_pr_cached_obj = self.env['virtual.room.pricelist.cached']
|
||||
vroom_pr_cached_obj = self.env['room.pricelist.cached']
|
||||
|
||||
for vroom in vrooms:
|
||||
days = {}
|
||||
|
||||
@@ -13,13 +13,13 @@ class IrDefault(models.Model):
|
||||
super(IrDefault, self).set(model_name, field_name, value, user_id, company_id, condition)
|
||||
if model_name == 'res.config.settings' and field_name == 'parity_pricelist_id':
|
||||
pricelist_id = int(value)
|
||||
self.env['virtual.room.pricelist.cached'].search([]).unlink()
|
||||
self.env['room.pricelist.cached'].search([]).unlink()
|
||||
|
||||
pricelist_items = self.env['product.pricelist.item'].search([
|
||||
('pricelist_id', '=', pricelist_id)
|
||||
])
|
||||
vroom_obj = self.env['hotel.room.type']
|
||||
vroom_pr_cached_obj = self.env['virtual.room.pricelist.cached']
|
||||
vroom_pr_cached_obj = self.env['room.pricelist.cached']
|
||||
for pitem in pricelist_items:
|
||||
date_start = pitem.date_start
|
||||
product_tmpl_id = pitem.product_tmpl_id.id
|
||||
|
||||
Reference in New Issue
Block a user