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

Proposed by Alexandre Fayolle - camptocamp
Status: Merged
Merged at revision: 5320
Proposed branch: lp:~camptocamp/ocb-server/ocb-7.0-fix_1204920-afe
Merge into: lp:ocb-server
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/ocb-server/ocb-7.0-fix_1204920-afe
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Pedro Manuel Baeza code review Approve
Holger Brunn (Therp) Needs Information
Raphaël Valyi - http://www.akretion.com Approve
Review via email: mp+208390@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

LGTM

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alexandre, why don't you initialize partner to False and avoid comparison?

Regards.

review: Needs Information
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

why not simply initialize partner to browse_null, then you don't need to do anything in #16?

review: Needs Information
5274. By Alexandre Fayolle - camptocamp

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

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Thanks for the reviews. I updated both this MP and the original one by using orm.browse_null() instead of None.

5275. By Alexandre Fayolle - camptocamp

[MRG] resolved merge conflict

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the changes.

Regards.

review: Approve (code review)
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I see the upstream branch is green on runbot, and Holger's old comment has been honoured.

Thanks!

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) :
review: Approve

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:34:30 +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:

Subscribers

People subscribed via source and target branches

to status/vote changes: