[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) <whe@odoo.com>
This commit is contained in:
Martin Maes
2023-01-18 13:25:35 +01:00
parent be2cc1b18a
commit 5d69c69c57
+3
View File
@@ -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);
}