Writing the action in your script is not enough you must also assign it to your model.