diff options
| author | Dharmraj Jhala <dja@odoo.com> | 2021-04-02 07:22:07 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-04-21 10:20:00 +0000 |
| commit | 9ac6b921c7e1918a229aeeef97890f19deac1d37 (patch) | |
| tree | fc4623cd51f2b5c861947ecb091b68c0c160c815 /addons/note/controllers/__init__.py | |
| parent | e11400f1178563f869cc4284d1cd76898c9b749b (diff) | |
[FIX] mass_mailing: show correct recipient count in merge wizard
Right now, when o2m/m2m are set from default_get from web client,
the compute methods from the records being set yield `NewId` when
we try to get ID for the record, even if the records are existing.
It can result into wrong computation when the ids of the records
are used in preparing the data.
The same thing happens in the wizard that is used to merge mailing
lists. When we select multiple mailing lists and open the wizard
to merge them, they are set in the `src_list_ids` of wizard, but
number of recipients are always zero for them, because the method
that computes `contact_nbr` (recipients) on mailing lists fetches
data from the query, but we can't match (or find) the stats from
query result because we don't get the actual ID in recordset for
existing records.
This commit fixes the behavior by using `_origin` on the records
while finding data in the compute method, and thus getting the
correct recipient count.
Task ID-2471692
COM odoo/odoo#67213
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/note/controllers/__init__.py')
0 files changed, 0 insertions, 0 deletions
