diff options
| author | Adrian Torres <adt@odoo.com> | 2020-04-06 13:07:43 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2020-04-06 16:18:02 +0000 |
| commit | 24b3cf63ff596a57022465bf01406b8c07d7a2e7 (patch) | |
| tree | 02789ccaa14df1757679f114e5245c96651996d7 /addons/l10n_cl | |
| parent | d997aa1574e43beb58d95cab4574029bbc8f7b8e (diff) | |
[FIX] crm: make crm.team.write work in batch again
When `_synchronize_alias` was introduced into crm.team.write, the write
method become incompatible with batch writes because
`_synchronize_alias` assumes `self` is a recordset of length 1 and
performs attribute accesses directly on self, this makes the __get__
crash because it performs a `self.ensure_one()`
With this commit, crm.team.write will iterate over the self recordset
and call `_synchronize_alias` on every record of the recordset.
This also solves a uninstallation problem in sale_crm because a write is
performed on crm.team in an uninstall_hook.
closes odoo/odoo#49088
X-original-commit: a9511cd42be365e58371d717b8197aac644eaf33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Diffstat (limited to 'addons/l10n_cl')
0 files changed, 0 insertions, 0 deletions
