Before this commit, the alert_start_time was not erased when a status
change from 'alert' to 'ok' for an irregular worker.
People find that unintuitive (despite this date was in the past when
you are in 'ok' status).
Now, this alert_start_time was erased when the status change from
'alert' to 'ok'.
This fix the case where a worker is unsubscribed from a shift where he
is supercooperator.
In the function unsubscribed_from_today, when removing the supercoop,
the field is_regular was also set to False. I seams that this is not
correct as this field is related to the worker_id not to the supercoop.
Also, I found other issues as when removing a worker_id the fields
is_regular and is_compensation was not reset.
This let me think about other cases where worker_id is emptied, the
is_regular and is_compensation would be never been reset if the
programmer doesn't think to reset it.
So I modified the constrains on these field in order to have these field
reset properly when worker_id is changed.
This commit brings fix a bug that occur when a worker do a shift before
her future_alert_date and the shift was marked as attended after the
future_alert_date. In such a case, the worker fell in alert state and
get a -2. This don't fix the fact that the worker fall in alert. But
brings correction when the shift is finally marked as attended.
There was an issue that shows an error message when trying to modify the
settings for shift in the website configuration.
This is due to a missing sequence in the database. I don't know why this
sequence where not present. But a simple query create it if it doesn't
exists.
This adds a field `supervisor_id` that aims to replace the `create_uid`
field. To prevent regressions, the old `create_uid` field is set to be a
computed field that has the same value as `supervisor_id`. This allow to
ensure that other part of the program that refer to `create_uid` as the
responsible for a purchase order will get the value of `supervisor_id`.
This new version comes with a migration script that fill the new
`supervisor_id` with the value of `create_uid` if `supervisor_id` is not
set yet.
This trick is done because the `create_uid` field is a magic field that
belongs to the ORM. This field cannot be modified in a form.
[ADD] Add files and action menu
[IMP] Tests to fill wizard with products lines
[ADD] Get product.template method
[ADD] Load right template wizard
[ADD] Method to get lines product
[ADD] beesdoo_stock: actions on articles in stock.picking