support for primary keys fields other than id

I've seen pk is used all over the models.py file except in get_product. This generates errors if the product has not an id field (but another primary key). The proposed patch solves the problem.