[FIX] In sorted(), don't assume ids are ints
[FIX] In sorted(), don't assume ids are ints

Some classes, even in core modules like the calendar, use "virtual"
ids which are not represented as integers. If you try to get a
sorted copy of such a recordset, it'll raise a ValueError.

This commit fixes the method, making it agnostic to the type of the
'id' member variable.

ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo,ThinkOpen-Solutions/odoo