diff options
| author | nie <nie@odoo.com> | 2020-10-14 08:07:42 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2020-10-14 09:59:40 +0000 |
| commit | fdbc2ab7a69f4f413bc44c885ba3d94728caae4d (patch) | |
| tree | 0be88dc33742c03b6d540ea10c3dc552e541a130 /addons/hr_timesheet | |
| parent | b6791a5183ef1015b47312785501a99ed68e5718 (diff) | |
[FIX] sale_timesheet_enterprise: Timesheet date not respecting timezone
Steps to reproduce the bug:
- Set the timezone of the user to Australia/Melbourne
- Set the country of the company to Australia
- Set the time of the system to 20:00 UTC
- Have Project and Sales installed
- Enable Timesheet and Timesheet Timer on project (A)
- Create a task in project (A)
- Click Start and then Stop
- Confirm the wizard
Bug:
The date of the new timesheet line is set to yesterday.
opw:2351204
Original PR: odoo/enterprise#14023
closes odoo/odoo#59961
X-original-commit: b85a5fc39887660992b5dd0f49ca331e38dd6030
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/hr_timesheet')
| -rw-r--r-- | addons/hr_timesheet/wizard/project_task_create_timesheet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_timesheet/wizard/project_task_create_timesheet.py b/addons/hr_timesheet/wizard/project_task_create_timesheet.py index 66b45196181..db4c8be41b2 100644 --- a/addons/hr_timesheet/wizard/project_task_create_timesheet.py +++ b/addons/hr_timesheet/wizard/project_task_create_timesheet.py @@ -23,7 +23,7 @@ class ProjectTaskCreateTimesheet(models.TransientModel): values = { 'task_id': self.task_id.id, 'project_id': self.task_id.project_id.id, - 'date': datetime.now(), + 'date': fields.Date.context_today(self), 'name': self.description, 'user_id': self.env.uid, 'unit_amount': self.time_spent, |
