[FIX] ir.translation: translated terms within view definitions were not loaded
authorOlivier Dony <odo@openerp.com>
Tue, 16 Sep 2014 13:41:37 +0000 (15:41 +0200)
committerOlivier Dony <odo@openerp.com>
Tue, 16 Sep 2014 15:46:25 +0000 (17:46 +0200)
commitb7a2cc13bad36e08e1e1f56391bc95a6ab623c9b
tree1d95a849800ff9409d31dce45814e92c35f001d1
parent2e0189770bce342e52aff9c2b98bbe6d141e23cd
[FIX] ir.translation: translated terms within view definitions were not loaded

The changes for QWeb template translation have introduced
res_id values in PO comments for all `#: view:` terms, as
the real database id needs to be resolved when loading them.

For non-QWeb views this is not necessary and actually caused
the terms to be dropped when the res_id could not be resolved.

Rather than having a different PO comment format for QWeb and
non-QWeb views, we can extend the QWeb hack to force the
res_id to 0 for non-QWeb views.

Fixes issue #1755
openerp/addons/base/ir/ir_translation.py