mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms: add tests for multi channel in reservations and folio, solve their problems and precommit
This commit is contained in:
committed by
Darío Lodeiros
parent
4be7a309a5
commit
95eb5bc7e0
@@ -2009,6 +2009,8 @@ class PmsReservation(models.Model):
|
||||
default_vals["email"] = folio.email
|
||||
elif vals.get("reservation_type") != "out":
|
||||
raise ValidationError(_("Partner contact name is required"))
|
||||
if folio.sale_channel_origin_id and "sale_channel_origin_id" not in vals:
|
||||
default_vals["sale_channel_origin_id"] = folio.sale_channel_origin_id.id
|
||||
vals.update(default_vals)
|
||||
elif (
|
||||
"pms_property_id" in vals
|
||||
|
||||
Reference in New Issue
Block a user