Monday, April 24, 2023
2 changes · master
Resolved issues and error corrections
This fixes an internal compatibility issue so Odoo continues to run correctly on Python 3.7, which is still a supported version. The change prevents a crash in core data handling by using an approach that works across supported Python versions.
Original PR description
Our minimal Python version is still Python3.7 `reversed(annoted_groupby.items())` doesn't work in Python3.7 because `dict_items` are not reversible in this version (only available in Python3.8 : https://docs.python.org/3/whatsnew/3.8.html#other-language-changes). Convert into list before `reversed` to be compatible in Python3.7
Marketing automation campaigns now correctly record participant values even when a campaign has no grouped activity data. This prevents missing or blank participant information and keeps campaign reporting reliable.
Original PR description
on defaultdict in _compute_participants This solves an issue with _compute_participants not setting any value if a campaign wasn't present in the return of a _read_group. We recently started using a defaultdict when adapting to the improved _read_group method at https://github.com/odoo/enterprise/commit/0a24c01ec178984df032710b81d562366c016ebb defaultdict will not add new entries when using the `get` method. It will instead return None like a regular dict. We just replace .get with directly addressing the element. task-3284558