Files
odoo_source/addons/analytic/models
Nicolas Martinelli 802339c12d [FIX] analytic, hr_timesheet: recompute order
When creating a timesheet, several fields need to be recomputed:
- `currency_id`
- `group_id`
- `department_id`
- `is_timesheet`
- `validated`

When `validated` is computed before the other fields, the recomputation
will lead to an `AccessError` because of the rule
`hr_timesheet.timesheet_line_rule_user`.

Since the test `test_timesheet_validation_user` expects an
`AccessError`, the test succeeds. However, from time to time,
`validated` is computed last => the `AccessError` is not raised.

Actually, a `ValidationError` should be raised in this case (from the
`create` override in `timesheet_grid`).
2018-04-03 08:30:30 +02:00
..