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

Proposed by Guewen Baconnier @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-server/6.1-fix-translate-1029334
Merge into: lp:openobject-server/6.1
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/6.1-fix-translate-1029334
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+116818@code.launchpad.net

Description of the change

Fix for bug: lp:1029344

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

To post a comment you must log in.
4249. By Guewen Baconnier @ Camptocamp <email address hidden> on 2012-07-26

[IMP] improved style as suggested by Alexandre Fayolle

Unmerged revisions

4249. By Guewen Baconnier @ Camptocamp <email address hidden> on 2012-07-26

[IMP] improved style as suggested by Alexandre Fayolle

4248. By Guewen Baconnier @ Camptocamp <email address hidden> on 2012-07-26

[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-29 12:04:18 +0000
3+++ openerp/tools/translate.py 2012-07-26 12:53:27 +0000
4@@ -655,7 +655,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