[FIX] mrp: fix workorder timer for sample data
get_working_duration can't work on generated samples. closes odoo/odoo#107934 Task: 3098709 X-original-commit: 642ca37e4e5a3db6ef7929a25850fafc499e4257 Signed-off-by: William Henrotin (whe) <whe@odoo.com> Signed-off-by: Jean-François Aubert <ajf@odoo.com>
This commit is contained in:
@@ -43,7 +43,7 @@ export class MrpTimer extends Component {
|
||||
: this.props.record.data.is_user_working;
|
||||
|
||||
onWillStart(async () => {
|
||||
if(this.props.ongoing === undefined && this.props.record.data.state == "progress") {
|
||||
if(this.props.ongoing === undefined && !this.props.record.model.useSampleModel && this.props.record.data.state == "progress") {
|
||||
const additionalDuration = await this.orm.call('mrp.workorder', 'get_working_duration', [this.props.record.resId]);
|
||||
this.state.duration += additionalDuration;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user