[FIX] kanban: wrong condition to reset the dataset index

The dataset index should be reset either if the dataset is empty or the index is greater than the records size
[FIX] event: translate templates into user language

When sending an email of the registration/confirmation, the context was lost and the tempate sticked in en_US.
With the patch, the template will use the current user's language.
[IMP] stock: display translated selection value in message

When a user tried to delete a done or canceled picking, the error messages used to display the key of the selection field ('done' or 'cancel') which was surprising in other languages than English. This patch takes the string value of the selection field, keeping the context to get the translated value (opw 613068)
[FIX] purchase: keep fallback behaviour that was removed at rev 8973217

If no valid invocie is found on the purchase order line, use the price and currency of the line (coherent with help message)