Merge lp:~camptocamp/openobject-server/7.0-fix_1204920-afe into lp:openobject-server/7.0

Proposed by Alexandre Fayolle - camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-server/7.0-fix_1204920-afe
Merge into: lp:openobject-server/7.0
Diff against target: 20 lines (+2/-1)
1 file modified
openerp/addons/base/res/res_partner.py (+2/-1)
To merge this branch: bzr merge lp:~camptocamp/openobject-server/7.0-fix_1204920-afe
Reviewer Review Type Date Requested Status
Leonardo Pistone (community) code review Approve
OpenERP Core Team Pending
Review via email: mp+208389@code.launchpad.net

Description of the change

[FIX] UnboundNameError in res_partner

To post a comment you must log in.
Revision history for this message
Leonardo Pistone (lepistone) wrote :

lgtm

review: Approve (code review)
5089. By Alexandre Fayolle - camptocamp on 2014-04-11

[IMP] improve fix by using browse_null instead of None for default partner value

5090. By Alexandre Fayolle - camptocamp on 2014-04-11

[MRG] resolved merge conflict

Unmerged revisions

5090. By Alexandre Fayolle - camptocamp on 2014-04-11

[MRG] resolved merge conflict

5089. By Alexandre Fayolle - camptocamp on 2014-04-11

[IMP] improve fix by using browse_null instead of None for default partner value

5088. By Alexandre Fayolle - camptocamp on 2014-02-26

[FIX] UnboundLocalError

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/res/res_partner.py'
2--- openerp/addons/base/res/res_partner.py 2014-04-04 14:16:11 +0000
3+++ openerp/addons/base/res/res_partner.py 2014-04-11 08:36:24 +0000
4@@ -28,7 +28,7 @@
5 import openerp
6 from openerp import SUPERUSER_ID
7 from openerp import pooler, tools
8-from openerp.osv import osv, fields
9+from openerp.osv import osv, fields, orm
10 from openerp.osv.expression import get_unaccent_wrapper
11 from openerp.tools.translate import _
12 from openerp.tools.yaml_import import is_comment
13@@ -696,6 +696,7 @@
14 adr_pref.add('default')
15 result = {}
16 visited = set()
17+ partner = orm.browse_null()
18 for partner in self.browse(cr, uid, filter(None, ids), context=context):
19 current_partner = partner
20 while current_partner: