summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2018-09-19 12:43:13 +0200
committerXavierDo <xdo@odoo.com>2018-09-19 14:10:19 +0200
commit97dbdc418d3c93d8d4c77b37068de4cbf31aa759 (patch)
treebde11518c070506ef296fd4a2b61c4da505224e1 /doc/reference/javascript_reference.rst
parentd30fa8311424ec1776f4b000e9e6f922164378cd (diff)
[FIX] mail: keep update of subtypes in dropdown
Since saas-11.4 the subtype dropdown don't keep changes of subtype. Before saas-11.4 the update was relying on the fact that the follower id changes on each subtype edition. This is no longer the case. The test is addapted to remove the hack simulating this behaviour. The read_followers route is not called if no there is no changes in the follower ids https://github.com/odoo/odoo/blob/905e01921f3c3ef43ace6fc537d1d8c0d280002c/addons/mail/static/src/js/followers.js#L195 Leading to the follower list not being update Note that the subtype update in dropdown was working fine after adding a new follower: the read_followers will return a None as suptype when called for a list of partner not containing the current user. Since the subtypes was falsy, the render was not rendering the dropdown again, keeping the value of the checkboxes. We can still create some inconsistency by editing the subtype from the follower list. To avoid that a check is made when updating subtypes after calling read_followers. The chosen solution here is to keep the update on subtypes in memory. This will avoid a call on read_followers to fetch information that we already know, using the assumption that the operation was successfull whish should be the case when a user edit subtypes on a record he has access to. Others solutions: -force the call to read_followers with the current user, maybe by removing it from this.follower after editing subtypes. -call read_subscription_data explicitely Obviously follower.js should be refactored to fix this a better way. Task: #1886982 PR: #27093
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions