diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-04-13 10:47:11 +0200 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2018-04-13 10:47:11 +0200 |
| commit | 3b158b65c118d24b32aedc27c50e9dd726b04280 (patch) | |
| tree | c9417bf418c0743848c4c3d579fdcf7c4e7ea0fe /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 2f16d6bfe397b7d0c8ff31bfe7eb0c326f2740e8 (diff) | |
[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`).
This commit is a cherry-pick of 802339c12d1984d1f29e574378cd8df2471ab098
and dcca2e8b9da685c13ba3fe8d3196b8e83fb429ba
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions
