-
-
+
+
diff --git a/hotel/wizard/checkinwizard.py b/hotel/wizard/checkinwizard.py
index 2ce8cce0b..8bb5b669e 100644
--- a/hotel/wizard/checkinwizard.py
+++ b/hotel/wizard/checkinwizard.py
@@ -115,8 +115,8 @@ class Wizard(models.TransientModel):
mobile_checkin_partner = fields.Char('Mobile')
- segmentation_id = fields.Many2many(
- related='reservation_id.folio_id.segmentation_ids')
+ segmentation_ids = fields.Many2many(
+ related='reservation_id.segmentation_ids')
''' TODO: clean-up - list of checkins on smart button clean is not used anymore
diff --git a/hotel/wizard/folio_make_invoice_advance.py b/hotel/wizard/folio_make_invoice_advance.py
index 7448d558a..aac9fc3a6 100644
--- a/hotel/wizard/folio_make_invoice_advance.py
+++ b/hotel/wizard/folio_make_invoice_advance.py
@@ -195,10 +195,6 @@ class FolioAdvancePaymentInv(models.TransientModel):
inv_obj = self.env['account.invoice']
precision = self.env['decimal.precision'].precision_get('Product Unit of Measure')
folios = self.folio_ids
-
- for folio in folios:
- if folio.partner_invoice_id != self.partner_invoice_id:
- raise UserError(_('The billing directions must match'))
if self.advance_payment_method == 'all':
inv_data = self._prepare_invoice()
diff --git a/hotel/wizard/massive_price_reservation_days.py b/hotel/wizard/massive_price_reservation_days.py
index d0ce29ca0..217581d5d 100644
--- a/hotel/wizard/massive_price_reservation_days.py
+++ b/hotel/wizard/massive_price_reservation_days.py
@@ -7,6 +7,9 @@ class MassivePriceChangeWizard(models.TransientModel):
_name = 'hotel.wizard.massive.price.reservation.days'
new_price = fields.Float('New Price', default=1, min=1)
+ change_price = fields.Boolean('Change Prices', default=False)
+ new_discount = fields.Float('New Discount', default=0, min=1)
+ change_discount = fields.Boolean('Change Discounts', default=False)
@api.multi
def massive_price_change_days(self):
@@ -18,29 +21,16 @@ class MassivePriceChangeWizard(models.TransientModel):
return False
cmds = []
- for rline in reservation_id.reservation_lines:
+ for rline in reservation_id.reservation_line_ids:
cmds.append((
1,
rline.id,
{
- 'price': self.new_price
+ 'price': self.new_price if self.change_price == True else rline.price,
+ 'discount': self.new_discount if self.change_discount == True else rline.discount
}
))
reservation_id.write({
- 'reservation_lines': cmds
+ 'reservation_line_ids': cmds
})
- # FIXME: For some reason need force reservation price calcs
- reservation_id._computed_amount_reservation()
- # FIXME: Workaround for dispatch updated price
- reservation_id.folio_id.write({
- 'room_lines': [
- (
- 1,
- reservation_id.id, {
- 'reservation_lines': cmds
- }
- )
- ]
- })
-
return True
diff --git a/hotel/wizard/massive_price_reservation_days.xml b/hotel/wizard/massive_price_reservation_days.xml
index f361a5d8e..2f0c00fcd 100644
--- a/hotel/wizard/massive_price_reservation_days.xml
+++ b/hotel/wizard/massive_price_reservation_days.xml
@@ -7,7 +7,14 @@
@@ -53,9 +54,10 @@
'hidden_cardex': True, 'edit_cardex': True }"/>
+
-
-
+
+