summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_cache
AgeCommit message (Collapse)Author
2021-01-22[FIX] mail: fix inbox mark all as read on thread viewSébastien Theys
task-2426357 task-2426366 closes odoo/odoo#64009 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-20[FIX] mail: avoid a stack overflow during loadingPaul Morelle
When the amount of mail messages is big enough (about 1500?), the recursion goes deeper and deeper, until the Javascript limit raises an infinite recursion error. This commit fixes the issue by avoiding to run an inner _flushUpdateCycle with the update if the change is not needed, so the second time that it is reached it does not start a new update, which would have run another flush update cycle. closes odoo/odoo#62076 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-16[FIX] mail: fix race conditions, especially with scrollSébastien Theys
The `_update` of some components must take place before the `_update` of other (usually sibling) components that might directly influence their layout. This is in particular the case for `_update` that are relying on height. Prevent force save of scroll position if there are pending hints to adjust it, and prevent pending hints from overriding new scroll value. Prevent flicker with message date. This should fix all known issues related to incorrectly saving or restoring scroll position. task-2344226 task-2358066 task-2369332 task-2372339 task-2373741 closes odoo/odoo#61054 Related: odoo/enterprise#14736 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-05[FIX] mail: prevent load messages if already loadingXavier Dubuc
task-2373952 closes odoo/odoo#61172 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-28[FIX] mail: do not consider message with subtype as emptyXavier Dubuc
task-2362022 closes odoo/odoo#60088 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09[FIX] mail: fix discuss search filters and related issuesSébastien Theys
- don't reset `stringifiedDomain` when changing thread (this led to the control panel displaying obsolete filters) - refresh non-main cache that are currently displayed when there is a known change of messages in the same thread's main cache - refresh non-main-cache on displaying them, to fetch potentially new messages - fix discuss "select all" conditions task-2171873 task-2282374 closes odoo/odoo#59631 X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9 Related: odoo/enterprise#13958 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-08[FIX] mail: avoid useless (un)link when using replaceSébastien Theys
Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 closes odoo/odoo#59508 X-original-commit: 75a44675873d65fdf17f2205772b05a0f59bb42c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-04[FIX] mail, sms, snailmail: prevent message_fetch for hidden threadsXavier Dubuc
Automatically load messages from a thread cache only if the thread cache is used in at least one thread view. Ensure thread viewer don't keep thread view records alive when they are not displayed. This change is particularly important for performance, to avoid spamming RPC at init if many threads are opened in chat windows. task-2310623 closes odoo/odoo#57061 X-original-commit: dd6981c7812134e0588f80a157eaba45512cd68e Related: odoo/enterprise#12936 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-28[FIX] mail, *: rename thread viewer to thread viewSébastien Theys
The "viewer" should be the "parent" not the view itself. This distinction will become important in a future commit to allow viewers to not display the view in some situations. Rename done as a standalone commit to ease diff readability. Part of task-2310623 closes odoo/odoo#56737 X-original-commit: 1b811e6a972d72de02965adda67c5b039bee023f Related: odoo/enterprise#12756 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13[IMP] web, *: improve mock server and replace most mail mockRPCSébastien Theys
Improve mock server: - add support for mocked `fetch` - add support for `active_test` - add support for x2m `in` in domains - add support for default values computed from a function - implement a more natural "next id" compute - allow initial data without ids - ensure write and x2m commands integrity - improve bad data/bad commands error messages - always warn for failing RPC, not only in debug mode - fix all existing tests that had inconsistency data Other changes done in mail (or dependents) that are not just related to tests: - remove `direct_partner` from formatter result ->`correspondent` can be computed from other keys, especially `members` - fix `livechat_visitor` convertData -> only process if there is value - add `current_partner` and `current_user_id` as `init_messaging` result -> easier to mock than session - remove usage of `need_moderation` -> that was just a search indirection to `moderation_status` - adapt `partner_id` -> `res_partner_id` key in `_notification_format` -> to be consistent with field name - add name in result of `mail_partner_format` -> sometimes display_name is not the same - remove usage of `is_moderator` -> that was just an indirection to `moderation_channel_ids` Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523 task-2287171 closes odoo/odoo#55854 X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d Related: odoo/enterprise#12391 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-05[FIX] mail: clean up JS relations by storing recordsSébastien Theys
Remove the support and the conversion from record to localId and back from localId to record. Part of task-2308312 closes odoo/odoo#55481 X-original-commit: fc5e8be4e65518770a281f0dffae07854d20073a Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-03[FIX] mail: speed up insert by using localId instead of findSébastien Theys
Part of task-2308312 X-original-commit: 407dc9796543a27b6695c8d4da922c13dece5b38
2020-07-31[FIX] mail: batch create/insert of JS model for performanceSébastien Theys
PR: #55261 Part of task-2308312 closes odoo/odoo#55266 X-original-commit: eded5f6372d4f1cffd1a361bd8fa7fd8f1f8ae9e Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-30[FIX] mail: do not fetch 'user_notification' messages in threadXavier Dubuc
task-2296856 See odoo/enterprise#12095 closes odoo/odoo#55189 X-original-commit: 5aaff1547d04bccf20ef333f515811570e8b8e22 Related: odoo/enterprise#12100 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-16[FIX] mail: fix moderation accept multiple messages buttonXavier Dubuc
Once global "Accept" button is clicked, the accepted messages were not unchecked causing the button to stay hidden until next page reload. task-2285430 closes odoo/odoo#54549 X-original-commit: 5594de16f463507498e852c2d49d1cbe74ed7381 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-22[FIX] mail: consistent relations between threads, caches and messagesAlexandre Kühn
task-2171881 closes odoo/odoo#53440 X-original-commit: 80d13bb828ee75a50d8cea29046a8eb49c71948a Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-15[REF] mail, *: refactor messaging with OWLSébastien Theys
This commit is a significant rewriting of client-side discuss, chatter, chat window, and messaging menu using OWL. The behavior should be broadly the same, with some slight functional changes here and there. From a technical standpoint, the code of messaging is mainly organized in 2 main groups of modules: - models, which are logical entities that depict the client-side state of messaging as a whole. - components, which are in charge of displaying information from models. This refactoring also introduces new JS guidelines regarding folder structure (/static) and naming rules for JS modules. Community PR: https://github.com/odoo/odoo/pull/39023 Enterprise PR: https://github.com/odoo/enterprise/pull/6249 Task-1914207 This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier, with the precious help of Lucas to speed it up towards the end. closes odoo/odoo#39023 Related: odoo/enterprise#6249 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre Kühn <aku@odoo.com> Co-authored-by: Julien Giannone <jgi@odoo.com> Co-authored-by: Lucas Perais <lpe@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com> Co-authored-by: Xavier Dubuc <xdu@odoo.com>