From 5d69c69c57a7b85e4ddd764605ab5fd8250ca278 Mon Sep 17 00:00:00 2001 From: Martin Maes Date: Thu, 12 Jan 2023 14:21:14 +0000 Subject: [PATCH] [FIX] mrp: Workorder timer not updating on user input This PR addresses a bug where the user tries to update the real duration of a work order in the list view. The timer was updated in the backend (so the update was showing when refreshing the page) but not in the front The problem was the following : the state was never updated in the widget closes odoo/odoo#110132 X-original-commit: 42bb1ac5195b614de4de674c47864abab79a5082 Signed-off-by: William Henrotin (whe) --- addons/mrp/static/src/widgets/timer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mrp/static/src/widgets/timer.js b/addons/mrp/static/src/widgets/timer.js index 7c39c65dec1..dc5ac3fe109 100644 --- a/addons/mrp/static/src/widgets/timer.js +++ b/addons/mrp/static/src/widgets/timer.js @@ -67,6 +67,9 @@ export class MrpTimer extends Component { } get durationFormatted() { + if(this.props.value!=this.state.duration && this.props.record && !this.readonly){ + this.state.duration=this.props.value + } return formatMinutes(this.state.duration); }