[IMP] sale,purchase: allow invoicing

(closes #500)

(cherry picked from commit 84c0595aef3a417702c81b5226ae1f61817a2bf8)
Merge branch 'master' of https://github.com/odoo/odoo into master-linux64