[FIX] event: fix attendees (seats) computation in transitional mode
[FIX] event: fix attendees (seats) computation in transitional mode

When being in edit mode attendees count may be reset temporarily to 0.
Indeed when user change the event_type linked to the event it triggers
the computation of seats. Among those fields seats_expected is used to
display the attendee count in event form view.

In this commit we rewrite the computation in order to work in onchange mode.
It correctly update record in cache instead of rebrowsing event in a compute
and correctly support newid by checking _origin id.

This behavior is probably present since a few versions but as it is not
critical we target the last stable-saas.

closes odoo/odoo#46444

X-original-commit: f858f0432abc97a805e24674990acac510b45e9d
Signed-off-by: Thibault Delavallee (tde) <2d325771bb6e8870d87f0f3f7b45589a8338e550@openerp.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo