7.0 fix lp:1319109

Transmit parser_instance using partial function for mako translation callback. This to remove parser_instance from attribute as it can cause race condition on cursors.

Copyed from https://code.launchpad.net/~camptocamp/openobject-addons/7.0-fix-1319109