Merge lp:~camptocamp/openobject-server/trunk-fix-translate-1029334 into lp:openobject-server

Proposed by Guewen Baconnier @ Camptocamp
Status: Work in progress
Proposed branch: lp:~camptocamp/openobject-server/trunk-fix-translate-1029334
Merge into: lp:openobject-server
Diff against target: 13 lines (+3/-1)
1 file modified
openerp/tools/translate.py (+3/-1)
To merge this branch: bzr merge lp:~camptocamp/openobject-server/trunk-fix-translate-1029334
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+116817@code.launchpad.net

Description of the change

Fix for bug: lp:1029344

Synchronization of translation does not work when an abstract model is defined.

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

style note: "not a or not b or not c" can be rewritten to "not (a and b and c)" which I think could be more readable in this case.

4269. By Guewen Baconnier @ Camptocamp <email address hidden>

[IMP] improved style as suggested by Alexandre Fayolle

Revision history for this message
Vo Minh Thu (thu) wrote :

As said on the bug report, the condition is not good enough (we will filter out false positives). I put the merge prop. `on hold` while waiting back for your comments on the bug report. Feel free to put it back to `need review`. Thanks!

Unmerged revisions

4269. By Guewen Baconnier @ Camptocamp <email address hidden>

[IMP] improved style as suggested by Alexandre Fayolle

4268. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] do not try to translate fields on models which are not stored in database (when _auto is False)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/tools/translate.py'
2--- openerp/tools/translate.py 2012-06-28 14:16:32 +0000
3+++ openerp/tools/translate.py 2012-07-26 12:53:30 +0000
4@@ -646,7 +646,9 @@
5 _logger.error("name error in %s: %s", xml_name, str(exc))
6 continue
7 objmodel = pool.get(obj.model)
8- if not objmodel or not field_name in objmodel._columns:
9+ if not (objmodel and
10+ objmodel._auto and
11+ field_name in objmodel._columns):
12 continue
13 field_def = objmodel._columns[field_name]
14