[IMP] mrp: time tracking consider now as end date
When changing the duration on a time-tracking entry on a workorder, set the end time to now and calculate the start time by detracting the duration, instead of the other way around. Task: 3456827 (nr 35) Part-of: odoo/odoo#137535
This commit is contained in:
committed by
svs-odoo
parent
adb0476e5f
commit
2f56c8c0bb
@@ -418,7 +418,7 @@ class MrpWorkcenterProductivity(models.Model):
|
||||
|
||||
@api.onchange('duration')
|
||||
def _duration_changed(self):
|
||||
self.date_end = self.date_start + timedelta(minutes=self.duration)
|
||||
self.date_start = self.date_end - timedelta(minutes=self.duration)
|
||||
self._loss_type_change()
|
||||
|
||||
@api.onchange('date_start')
|
||||
|
||||
Reference in New Issue
Block a user