Merge lp:~unifield-team/unifield-server/us-2609 into lp:unifield-server

Proposed by Quentin THEURET @Amaris
Status: Merged
Merged at revision: 4275
Proposed branch: lp:~unifield-team/unifield-server/us-2609
Merge into: lp:unifield-server
Diff against target: 21 lines (+5/-6)
1 file modified
bin/addons/consumption_calculation/history_consumption.py (+5/-6)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-2609
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+319543@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/consumption_calculation/history_consumption.py'
--- bin/addons/consumption_calculation/history_consumption.py 2017-03-06 17:14:31 +0000
+++ bin/addons/consumption_calculation/history_consumption.py 2017-03-10 09:49:09 +0000
@@ -251,12 +251,11 @@
251 ''')251 ''')
252 else:252 else:
253 cr.execute('''253 cr.execute('''
254 SELECT distinct(product_id)254 SELECT distinct(s.product_id)
255 FROM stock_move255 FROM stock_move s
256 WHERE state = 'done'256 LEFT JOIN stock_location l ON l.id = s.location_id OR l.id = s.location_dest_id
257 AND257 WHERE l.usage in ('customer', 'internal')
258 (location_id IN %s OR location_dest_id IN %s)258 ''')
259 ''', (tuple(context.get('location_id', [])), tuple(context.get('location_id', []))))
260 product_ids = [x[0] for x in cr.fetchall()]259 product_ids = [x[0] for x in cr.fetchall()]
261260
262 # split ids into slices to not read a lot record in the same time (memory)261 # split ids into slices to not read a lot record in the same time (memory)

Subscribers

People subscribed via source and target branches

to all changes: