Update to work with OpenErp 7

It a first part of work, operational but not complete, for example I will add tests.