Merge lp:~therp-nl/openupgrade-server/6.1-reverse_model_type_check into lp:openupgrade-server/6.1

Proposed by Stefan Rijnhart (Opener) on 2013-07-21
Status: Merged
Merged at revision: 4005
Proposed branch: lp:~therp-nl/openupgrade-server/6.1-reverse_model_type_check
Merge into: lp:openupgrade-server/6.1
Diff against target: 17 lines (+5/-2)
1 file modified
openerp/modules/loading.py (+5/-2)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-server/6.1-reverse_model_type_check
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review 2013-07-21 Approve on 2013-07-22
Review via email: mp+176046@code.launchpad.net
To post a comment you must log in.
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/modules/loading.py'
2--- openerp/modules/loading.py 2012-07-17 12:14:55 +0000
3+++ openerp/modules/loading.py 2013-07-21 10:34:28 +0000
4@@ -172,8 +172,11 @@
5 if not model._name: # new in 6.1
6 return
7
8- # persistent models only
9- if isinstance(model, osv.orm.TransientModel):
10+ # persistent models only. Note that transient models that
11+ # inherit from persistent models cause those models to be
12+ # an instance of TransientModel too (e.g. email.template)
13+ # Therefore, check for a negation of Model instantion
14+ if not isinstance(model, osv.orm.Model):
15 return
16
17 model_registry = local_registry.setdefault(

Subscribers

People subscribed via source and target branches

to status/vote changes: