Skip to content

Commit

Permalink
[FIX] travis
Browse files Browse the repository at this point in the history
  • Loading branch information
LoisRForgeFlow committed Jan 12, 2017
1 parent 579a628 commit 9a54191
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions stock_inventory_exclude_sublocation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ given location.
Sometimes we just want to make an inventory adjustment of just one shelf, or
space and forget about extra subdivisions in the location. In other cases we
do inventories of smaller locations contained in our stock, so we don't want
to count them again when doing an inventory adjustment of the parent location
. E.g. if we apply a cycle count strategy.
to count them again when doing an inventory adjustment of the parent location.
E.g. if we apply a cycle count strategy.


Usage
Expand Down
4 changes: 2 additions & 2 deletions stock_inventory_exclude_sublocation/models/stock_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def _get_inventory_lines(self, inventory):
args += (inventory.package_id.id,)

self.env.cr.execute('''
SELECT product_id, sum(qty) as product_qty, location_id, lot_id as prod_lot_id, package_id, owner_id as partner_id
SELECT product_id, sum(qty) as product_qty, location_id, lot_id
as prod_lot_id, package_id, owner_id as partner_id
FROM stock_quant WHERE''' + domain + '''
GROUP BY product_id, location_id, lot_id, package_id, partner_id
''', args)
vals = []
for product_line in self.env.cr.dictfetchall():
#replace the None the dictionary by False, because falsy values are tested later on
for key, value in product_line.items():
if not value:
product_line[key] = False
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

Expand All @@ -15,4 +16,4 @@
</field>
</record>

</odoo>
</odoo>

0 comments on commit 9a54191

Please sign in to comment.