mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms: change sale_channel_origin of a folio when it has one reservation
This commit is contained in:
committed by
Darío Lodeiros
parent
95eb5bc7e0
commit
cc03cc2d67
@@ -2118,7 +2118,10 @@ class PmsReservation(models.Model):
|
||||
for res in self.filtered(lambda r: r.folio_id == folio)
|
||||
)
|
||||
and vals["sale_channel_origin_id"] != folio.sale_channel_origin_id.id
|
||||
and ("force_update_origin" in vals and vals.get("force_update_origin"))
|
||||
and (
|
||||
("force_update_origin" in vals and vals.get("force_update_origin"))
|
||||
or len(folio.reservation_ids) == 1
|
||||
)
|
||||
):
|
||||
folios_to_update_channel += folio
|
||||
return folios_to_update_channel
|
||||
|
||||
Reference in New Issue
Block a user