I am writing a module that will allow a user to take a picture of the employee right from the employee record. It's a web module and it's triggered by a client action (activated by clicking a button in the hr.employee form view). I have the mechanics of getting the picture and saving it to the database worked out. However, I don't have any way of finding out the id of the employee to which it belongs. In a regular (server side) module you can usually just get it from the context. But it seems this is not possible in a web module. I found a field called active_id in instance.session but it is incorrect (I don't know if that's by design or if it's a bug). I also found a user_context object in instance.session but it contains only lang, tz, and uid.
Is there a way I can find out the id of the record from which a client action was launched?