[FIX] event: always synchronize tags, seats_max and auto_confirm with category
We consider that changing category should always update value of those fields to avoid having oddly-configured events. Indeed if you choose a new event category most of its configuration should be propagated to the event. Task ID 2244487 PR odoo/odoo#52998 FwdPort of odoo/odoo#52923 X-original-commit: f7e747886caebf37d60037a3e0e760f95bd0fb68
This commit is contained in:
@@ -367,17 +367,13 @@ class EventEvent(models.Model):
|
||||
event.seats_max = 0
|
||||
continue
|
||||
|
||||
if event.event_type_id.seats_max:
|
||||
event.seats_max = event.event_type_id.seats_max
|
||||
event.seats_max = event.event_type_id.seats_max
|
||||
|
||||
if event.event_type_id.has_seats_limitation != event.seats_limited:
|
||||
event.seats_limited = event.event_type_id.has_seats_limitation
|
||||
|
||||
if event.event_type_id.auto_confirm != event.auto_confirm:
|
||||
event.auto_confirm = event.event_type_id.auto_confirm
|
||||
|
||||
if event.event_type_id.tag_ids:
|
||||
event.tag_ids = event.event_type_id.tag_ids
|
||||
event.auto_confirm = event.event_type_id.auto_confirm
|
||||
event.tag_ids = event.event_type_id.tag_ids
|
||||
|
||||
@api.depends('event_type_id')
|
||||
def _compute_event_mail_ids(self):
|
||||
|
||||
Reference in New Issue
Block a user