hr_timesheet - Unexplicit error when not filling "Invoicing" field
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenERP |
Fix Released
|
Undecided
|
Fabien (Open ERP) |
Bug Description
As documented here: http://
There is an error in the hr_timesheet (or hr_timesheet_
To reproduce, go to "Human Resources" -> "Hours encoding" -> "New" and encode a timesheet entry, intentionally forgetting the "Invoicing" field (which is marked in a way that lets us think that it is not necessary).
You get something like this (in a popup):
ERROR: null value in column “journal_id” violates not-null constraint
insert into “account_
This is fixed by indicating an "Invoicing" entry.
A quick-fix to this is to change the "Invoicing" field to "mandatory", so it is marked in red.
The "good" fix to this is to indicate a clear error message stating that the invoicing field is actually mandatory in this case, and where it can be created ("Financial Management" -> "Configuration" -> "Analytic Accounts" -> "Types of invoicing")
It's not related to the invoicing field, which is not required. This appears when you try to fill in timesheets for a user that have no employee related to it. Or, the user may have an employee defined for it but no analytic journal is set on the employee form related to the user that fills in the timesheet.
A fixed as been commited in trunk (r1499) to put a clear and better message for the
end-user in case of such a misconfiguration.
This is not a real bug (misconfiguration of your system), so no modification are applied in the stable.
Thanks.