a6ae780078812d60ac99691a5fc860192c7ebc29
Before this commit, when making an activity set at a specific date, and then changing its deadline, the activity in chatter still displays the old date instead of new date. Steps to reproduce: - schedule an activity in chatter for today - edit activity and change deadline for tomorrow => Activity in chatter shows "Today" instead of "Tomorrow" This happens because the compute of date delay in activity component is made locally and relies on a field in activity model, which itself is a reactive (because the activities are stored in discuss store, which itself is reactive). This compute is made at setup and on change of props. However, when the `deadline_date` in activity model changes then the model is still the same, therefore it doesn't trigger the `onWillUpdateProps`. This would work if this part of template was fully relying on `deadline_date`. It was the case for the icon, so the icon is working well. But the label was computed locally, so OWL could not detect that `state.delay` needs to be recomputed. This commit fixes the issue by replacing `state.delay` to a getter that reads on `activity.deadline_date`, so that this is reactive to changes on `deadline_date`. Also fixing a memory leak of a `setTimeout` that was not cleared on unmounting `Activity` component. closes odoo/odoo#127319 X-original-commit: d7e314dde8d7bb20ed83ba821cdad1009c87e4c8 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%