Files
odoo_source/addons
Kishan Gajjar c1f04bef83 [IMP] hr_timesheet: make it easier to encode timesheets
In this commit, we do two small changes to make it easier to encode
timesheets.  The main issue is that we want to solve the following
situation: a user clicks on a cell in a timesheet grid view to open a
list view, then clicks on 'Create' to create a new timesheet. This will
open a form view, but some fields which could be prefilled are not
filled.

- do not reset task_id in some cases. This is important for the onchange
  call which comes after a default_get, when there is a default project
value set.
- do not set employee_id if there is default_employee_id in context
  This is useful when we open timesheets from the 'All Timesheets'
menu item, then add a new line, select a different employee, and open it
in the grid view (by clicking on the + icon from a cell).  This opens a
list view, which is editable, but when we create a new entry, it ignores
the employee value.

Note: a commit in enterprise adds support for properly passing contexts
in grid view, see
https://github.com/odoo/enterprise/commit/f23003917f18b52bb69483cdaac3cb2164230aa6

Task: #35414
2018-05-11 16:19:26 +02:00
..
2018-03-26 13:36:33 +02:00
2018-03-15 08:50:38 +01:00
2018-05-08 13:24:47 +02:00
2018-04-23 17:14:27 +02:00