summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/widgets
AgeCommit message (Collapse)Author
2020-10-09[FIX] mail: ask for confirmation before attachment deletionXavier Dubuc
also hide all messages with empty body and no attachments task-2282322 closes odoo/odoo#59672 X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef Related: odoo/enterprise#13971 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> 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-07[FIX] mail: clean up relations between chatter and threadSébastien Theys
This will prevent various flicker when using previous/next. task-2243518 closes odoo/odoo#59375 X-original-commit: 1559e82e6b781601286003c2aff364dbb19c9bfc Related: odoo/enterprise#13868 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-29[FIX] mail: reintroduce auto scroll on receiving messageSébastien Theys
task-2336251 closes odoo/odoo#58867 X-original-commit: f732980b2e5e83bcf2fdc8d3ce756f256cacbd4f Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-14[FIX] mail: no longer display unlinked attachments in chatterFrancois (fge)
Task-2337952 closes odoo/odoo#57627 X-original-commit: 55cb4a82ce2b59bc73ea05afa5971c96989b6159 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-11[FIX] im_livechat, mail, website_livechat: invite button in livechatsAlexandre Kühn
Task-2334724 closes odoo/odoo#57505 X-original-commit: 5316c91c27e48bfaa3ebf3fb97e35220fabc986e Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> 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-09-01[FIX] mail: message/activity link with dataset oe-id and oe-modelAlexandre Kühn
Task-2328718 closes odoo/odoo#56864 X-original-commit: 430aa0c2ffe242992fb935733d81f6e05a6d2458 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-28[FIX] mail, *: fix opens and redirects, adapt messaging menu closeSébastien Theys
task-2244279 task-2262862 task-2274993 task-2277537 task-2282238 closes odoo/odoo#56745 X-original-commit: 109f202 Related: odoo/enterprise#12761 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@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-27[FIX] mail: 'Cannot read messagingMenu of undefined' tracebackAlexandre Kühn
Before this commit, on page reload, sometimes web client crashed with `Cannot read 'messagingMenu' of undefined`. This happens due to messaging components making use of `messaging` in `env` as if it was always set. In some rare cases, this is false, hence the crash. This happens on root components of messaging such as the messaging menu. Creation of `env.messaging` has to be async, in other to ensure all JS module that patches messaging are applied. The mounting of messaging root components depends on other parts of the web client like the SystrayMenu. So the proper fix is to guard `env.messaging` on these root components. Task-2238245 closes odoo/odoo#56682 X-original-commit: d1483ff3c83bb3146e80e5d65a27915c5b2a2bf9 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-26[IMP] mail, mail_bot: move notif request and OdooBot name into mailDidier (did)
task-2282334 closes odoo/odoo#56584 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-19[FIX] mail: use right chatter field for chatter prop valueXavier Dubuc
task-2319706 closes odoo/odoo#56108 X-original-commit: 8955626b0f08be7364e715f0fdb91ef72a31f757 Signed-off-by: Alexandre Kühn (aku) <aku@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-07-29[FIX] mail: fix read more/less span insertionXavier Dubuc
task-2248307 closes odoo/odoo#55163 X-original-commit: a8ea9bc98d114eef056babc0d2639eaddbcf3778 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-23[IMP] *: adapt modules to Owl search panelJulien Mougenot
Adaptation of the rest of the environment to the changes regarding the refactored search panel and model. This commit includes the following changes: - Since the control panel model is now part of the search model, the view widget is responsible of its instantiation with the appropriate API; creating an ActionModel holding the required model extensions. - The controller is now importing/exporting the state of the entire search model as well as the current state of the search panel (given throught its props). Changes have been made to adapt to this behaviour. - The multiple components linked to the control panel model have been adapted to reflect the changes brought to it (they will now listen to the "searchModel" instead of the "controlPanelModel"). - The `test_utils_create` methods have also been adapted to properly instantiate a searchModel Part of task 2228968 Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-06[FIX] mail: do not let chatter to be rendered if form view is in dialogXavier Dubuc
task-2280151 closes odoo/odoo#54157 X-original-commit: 83f2a0605ad80cb8b544651b47b7d27e11b332cb Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-29[IMP] hr_timesheet: Improve the usability of timesheet portalqho
1. Generic timesheets improvements - Portal /my/timesheets - Add a group bys task, date, employee - Add search in project, name, employee, task * The task column should not be visible if none of the timesheets have the Task field set - If a group by task, date, employee or project is applied, the corresponding column should not be visible 2. Timesheets from sub-tasks on parent tasks - Portal /my/tasks - Display the 'Total Hours' spent on a task at the end of the list of timesheets - Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task) * Title should be: 'Timesheets for sub-task: xyz' * only visible if there are sub-tasks linked to this task * only visible if total hours > 0 3. Timesheets on Invoices - Portal /my/invoices - Add Project + task fields * Task field only visible if set on one of the timesheet entries * Project field only visible if there are at least 2 different projects in these timesheet entries 4. Correct visibility for the portal users - Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project - When a portal user is added as the message follower of the project, the user is added to allowed portal users as well - When a portal user is removed from allowed portal users, the user is also removed from message followers closes odoo/odoo#47248 Taskid: 2201908 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-25[FIX] mail: prevent auto-scrolling of form viewLucas Perais (lpe)
Use case 1: Arriving in a record => The form view is scrolled to the first chatter message Use case 2: switch record with the pager => The other record is also scrolled to the first message After this commit, arriving on a record or switching record displays the top of the form view task-2238141 PR #53136 closes odoo/odoo#53644 X-original-commit: 42605baa5b8ddb94318f5a9d91a489c200469377 Related: odoo/enterprise#11429 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>