Files
Thibault Delavallée c36f9c184d [FIX] event_sale: avoid multiple update of registration state
Various registration side updates depends on its state: notably communication
schedulers and lead rules management.

However event_sale changes the 'state' field from a classic selection field
to a computed one, introducing links with sale order and sale order lines
as well as payment state computation.

Currently code leads to a double update of state when creating a new
registration, which causes communication scheduler to be called twice and
create additional queries. This commit tries to avoid this by updating value
of state only once, instead of setting everything to draft then updating to
another value afterwards. This avoids notably schedulers to be triggered
or called twice in the same transaction.

Task-3764894: Event: Allow using cron triggers for communication
Part of Task-3084943: Event: Improve communication scheduler scalability

Part-of: odoo/odoo#155777
2024-03-18 10:23:55 +00:00
..
2023-10-13 07:33:49 +00:00