Merge lp:~registry/e-commerce-addons/fix1288719 into lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable

Proposed by Daniel Stenlöv
Status: Merged
Merged at revision: 289
Proposed branch: lp:~registry/e-commerce-addons/fix1288719
Merge into: lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable
Diff against target: 13 lines (+1/-2)
1 file modified
base_sale_multichannels/sale.py (+1/-2)
To merge this branch: bzr merge lp:~registry/e-commerce-addons/fix1288719
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Yannick Vaucher @ Camptocamp code review Approve
Review via email: mp+209667@code.launchpad.net

Description of the change

Fix bug lp:1288719, Wrong SQL-statement if product_m2mcategories is installed.

To post a comment you must log in.
290. By Daniel Stenlöv

[FIX] Correct SQL statement

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM

Thanks

review: Approve (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi Daniel,

I answered on your bug report here https://bugs.launchpad.net/e-commerce-addons/+bug/1288719/comments/4
The current code is valid. Usually I prefer not to change working code for no reason but we could argue it improve the readability, so I approve your proposal.

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_sale_multichannels/sale.py'
2--- base_sale_multichannels/sale.py 2013-11-09 16:30:45 +0000
3+++ base_sale_multichannels/sale.py 2014-03-06 13:05:09 +0000
4@@ -106,8 +106,7 @@
5
6 # If product_m2mcategories module is installed search in main category
7 # and extra categories. If not, only in main category
8- cr.execute('select * from ir_module_module where name=%s and state=%s',
9- ('product_m2mcategories','installed'))
10+ cr.execute("select * from ir_module_module where name='product_m2mcategories' and state='installed'")
11 if cr.fetchone():
12 res[shop['id']] = self.pool.get("product.product").search(cr, uid, ['|',
13 ('categ_id', 'in', all_categories),('categ_ids', 'in', all_categories)])

Subscribers

People subscribed via source and target branches