[IMP] Adapt to Odoo 8.0 and keep backward compatibility