Forward port of 6.1 branch

Before merging this one, wait until https://github.com/odoo/odoo/pull/1111 is merged into official odoo 7.0