[IMP] Improve code, it working with latest verison of opeenrp too.
[Fix] tested with version 6 and 7, working well.