apply patch from https://github.com/odoo/odoo/pull/1747 for odoo issue 1749