[tryton-debian-vcs] tryton-modules-stock branch debian-wheezy-2.2 created. 0f8565018d1c2cd1e108092af738f0194cfd06d2

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:10:21 UTC 2013


The following commit has been merged in the debian-wheezy-2.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock.git;a=commitdiff;h=0f8565018d1c2cd1e108092af738f0194cfd06d2
commit 0f8565018d1c2cd1e108092af738f0194cfd06d2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Nov 21 12:05:44 2013 +0100

    Removing inadvertently commited .pc directory.

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
deleted file mode 100644
index 6857a8d..0000000
--- a/.pc/.quilt_patches
+++ /dev/null
@@ -1 +0,0 @@
-debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
deleted file mode 100644
index c206706..0000000
--- a/.pc/.quilt_series
+++ /dev/null
@@ -1 +0,0 @@
-series
diff --git a/.pc/.version b/.pc/.version
deleted file mode 100644
index 0cfbf08..0000000
--- a/.pc/.version
+++ /dev/null
@@ -1 +0,0 @@
-2
commit 86617a66a4ce0b90803cca007c7bdf887a9d755c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Aug 7 17:24:39 2013 +0200

    Releasing debian version 2.2.8-1.

diff --git a/debian/changelog b/debian/changelog
index ee0c843..5df446c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-stock (2.2.8-1) unstable; urgency=low
+
+  * Merging upstream version 2.2.8.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 07 Aug 2013 17:13:22 +0200
+
 tryton-modules-stock (2.2.7-1) unstable; urgency=low
 
   * Merging upstream version 2.2.7.
commit 71efe220a1cd7db66d8e2b650b730cfdbd252e9e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Aug 7 17:11:40 2013 +0200

    Merging upstream version 2.2.8.

diff --git a/CHANGELOG b/CHANGELOG
index e5ea6ca..7638747 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.8 - 2013-07-22
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.7 - 2013-06-09
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 29fb981..123e0a3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.7
+Version: 2.2.8
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index 018f582..8ccf91b 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.7',
+    'version': '2.2.8',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/product.py b/product.py
index ae63abf..bbe74b1 100644
--- a/product.py
+++ b/product.py
@@ -365,8 +365,8 @@ class Product(ModelSQL, ModelView):
                     period_id, = period_ids
                     period = period_obj.browse(period_id)
                     state_date_clause += (' AND '
-                        '(COALESCE(effective_date, planned_date) > %s)')
-                    state_date_vals.append(period.date)
+                        '(COALESCE(effective_date, planned_date, %s) > %s)')
+                    state_date_vals.extend([datetime.date.max, period.date])
                     period_vals[0] = period.id
 
         if with_childs:
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index 10be356..bbfc863 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.7
+Version: 2.2.8
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit 9d4e46dbd41db5801d02b7ec03ea85b6996aa89b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Jun 11 14:42:58 2013 +0200

    Releasing debian version 2.2.7-1.

diff --git a/debian/changelog b/debian/changelog
index 36888c8..ee0c843 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-stock (2.2.7-1) unstable; urgency=low
+
+  * Merging upstream version 2.2.7.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 11 Jun 2013 14:06:57 +0200
+
 tryton-modules-stock (2.2.6-1) unstable; urgency=low
 
   * Merging upstream version 2.2.6.
commit 3023bffedecd627b3fb1d24f70ca029b893c0912
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Jun 11 13:53:39 2013 +0200

    Merging upstream version 2.2.7.

diff --git a/CHANGELOG b/CHANGELOG
index ec24a3c..e5ea6ca 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.7 - 2013-06-09
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.6 - 2013-05-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 7a0d4a0..29fb981 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.6
+Version: 2.2.7
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index eb53327..018f582 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.6',
+    'version': '2.2.7',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/product.py b/product.py
index af809f0..ae63abf 100644
--- a/product.py
+++ b/product.py
@@ -356,16 +356,18 @@ class Product(ModelSQL, ModelView):
                     context['stock_date_start'], today,
                     ])
         else:
-            period_ids = period_obj.search([
-                ('date', '<', context['stock_date_end']),
-            ], order=[('date', 'DESC')], limit=1)
-            if period_ids:
-                period_id, = period_ids
-                period = period_obj.browse(period_id)
-                state_date_clause += (' AND '
-                    '(COALESCE(effective_date, planned_date) > %s)')
-                state_date_vals.append(period.date)
-                period_vals[0] = period.id
+            with Transaction().set_user(0, set_context=True):
+                period_ids = period_obj.search([
+                    ('date', '<', context['stock_date_end']),
+                    ('state', '=', 'closed'),
+                ], order=[('date', 'DESC')], limit=1)
+                if period_ids:
+                    period_id, = period_ids
+                    period = period_obj.browse(period_id)
+                    state_date_clause += (' AND '
+                        '(COALESCE(effective_date, planned_date) > %s)')
+                    state_date_vals.append(period.date)
+                    period_vals[0] = period.id
 
         if with_childs:
             query, args = location_obj.search([
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index fe73e09..10be356 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.6
+Version: 2.2.7
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit 6e33891b1615972facd8299e6b93fe3c5a35edec
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 17:05:15 2013 +0200

    Releasing debian version 2.2.6-1.

diff --git a/debian/changelog b/debian/changelog
index e574279..36888c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-stock (2.2.6-1) unstable; urgency=low
+
+  * Merging upstream version 2.2.6.
+  * Updating copyright.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 04 May 2013 16:57:15 +0200
+
 tryton-modules-stock (2.2.5-1) unstable; urgency=low
 
   * Merging upstream version 2.2.4.
commit 146412509cec7846ce6267b6e6eabf850051d4cf
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 16:50:58 2013 +0200

    Updating copyright.

diff --git a/debian/copyright b/debian/copyright
index 55d4d1a..f63f527 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,9 +2,9 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
 Copyright: 2012 Openlabs Technologies & Consulting (P) LTD
-           2008-2012 Cédric Krier
+           2008-2013 Cédric Krier
            2008-2011 Bertrand Chenal
-           2008-2012 B2CK SPRL
+           2008-2013 B2CK SPRL
            2004-2008 Tiny SPRL
 License: GPL-3+
 
commit b942989456059f60345fe125a6f451ccee8e24c5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 16:48:12 2013 +0200

    Merging upstream version 2.2.6.

diff --git a/CHANGELOG b/CHANGELOG
index 81fa9d6..ec24a3c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.6 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.5 - 2013-02-12
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 101ffe2..590768d 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
 Copyright (C) 2012 Openlabs Technologies & Consulting (P) LTD.
-Copyright (C) 2008-2012 Cédric Krier.
+Copyright (C) 2008-2013 Cédric Krier.
 Copyright (C) 2008-2011 Bertrand Chenal.
-Copyright (C) 2008-2012 B2CK SPRL.
+Copyright (C) 2008-2013 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index 632eb3f..7a0d4a0 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.5
+Version: 2.2.6
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index 8b271a7..eb53327 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.5',
+    'version': '2.2.6',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/product.py b/product.py
index 0abfb8d..af809f0 100644
--- a/product.py
+++ b/product.py
@@ -255,9 +255,9 @@ class Product(ModelSQL, ModelView):
                             '(' \
                                 '(effective_date IS NULL) '\
                             'AND '\
-                                '(planned_date <= %s) '\
+                                '(COALESCE(planned_date, %s) <= %s) '\
                             'AND '\
-                                '(planned_date >= %s)'\
+                                '(COALESCE(planned_date, %s) >= %s)'\
                             ')'\
                         'OR '\
                             '(' \
@@ -273,7 +273,8 @@ class Product(ModelSQL, ModelView):
                 'done', context.get('stock_assign') and 'assigned' or 'done',
                 today, today,
                 'done', 'assigned', 'draft',
-                context['stock_date_end'], today,
+                datetime.date.max, context['stock_date_end'],
+                datetime.date.max, today,
                 context['stock_date_end'], today,
                 ]
 
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index 408c351..fe73e09 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.5
+Version: 2.2.6
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit 52960b6fd67b4ab8f0ef1febf245732aec945220
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 19 19:25:29 2013 +0100

    Releasing debian version 2.2.5-1.

diff --git a/debian/changelog b/debian/changelog
index 6260b2a..e574279 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tryton-modules-stock (2.2.5-1) unstable; urgency=low
+
+  * Merging upstream version 2.2.4.
+  * Merging upstream version 2.2.5.
+  * Updating to Standards-Version: 3.9.4, no changes needed.
+  * Removing obsolete Dm-Upload-Allowed
+  * Updating copyright.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sun, 24 Feb 2013 22:13:44 +0100
+
 tryton-modules-stock (2.2.3-1) unstable; urgency=low
 
   * Merging upstream version 2.2.3.
commit f558a166dc00eafa078c6321430ab9f0b0ccb306
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 22:09:31 2013 +0100

    Updating copyright.

diff --git a/debian/copyright b/debian/copyright
index 932fa84..55d4d1a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,11 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright:
-           2004-2008 Tiny SPRL
-           2008-2012 Cedric Krier
+Copyright: 2012 Openlabs Technologies & Consulting (P) LTD
+           2008-2012 Cédric Krier
            2008-2011 Bertrand Chenal
            2008-2012 B2CK SPRL
-           2012 Openlabs Technologies & Consulting (P) LTD
+           2004-2008 Tiny SPRL
 License: GPL-3+
 
 Files: icons/*
commit c2a730303235881bef14aa7affce185c8c7505cb
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 22:01:47 2013 +0100

    Removing obsolete Dm-Upload-Allowed

diff --git a/debian/control b/debian/control
index 8f4ccae..7c44bde 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,6 @@ Section: python
 Priority: optional
 Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
-Dm-Upload-Allowed: yes
 Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
 Standards-Version: 3.9.4
 Homepage: http://www.tryton.org/
commit 0179965dc22d701aee47b8388158e52041ec5086
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 22:01:09 2013 +0100

    Updating to Standards-Version: 3.9.4, no changes needed.

diff --git a/debian/control b/debian/control
index 8636dfe..8f4ccae 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
 Dm-Upload-Allowed: yes
 Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 Homepage: http://www.tryton.org/
 Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-stock.git
 Vcs-Git: git://debian.tryton.org/git/packages/tryton-modules-stock.git
commit e637dd0016d11f6f17bce76a7ed3d93acca99733
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 21:44:02 2013 +0100

    Merging upstream version 2.2.5.

diff --git a/CHANGELOG b/CHANGELOG
index 39fa2d2..81fa9d6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.5 - 2013-02-12
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.4 - 2012-11-05
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 2c561cf..632eb3f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.4
+Version: 2.2.5
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index 6e7d228..8b271a7 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.4',
+    'version': '2.2.5',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/location.py b/location.py
index e055796..4d1198c 100644
--- a/location.py
+++ b/location.py
@@ -205,11 +205,11 @@ class Location(ModelSQL, ModelView):
                     location_ids.add(location.output_location.id)
                 if not location.storage_location.parent:
                     location_ids.add(location.storage_location.id)
-        location_ids = list(location_ids)
-        if location_ids:
-            self.write(location_ids, {
-                'parent': location.id,
-                })
+                if location_ids:
+                    self.write(list(location_ids), {
+                        'parent': location.id,
+                        })
+                    location_ids.clear()
 
     def create(self, vals):
         res = super(Location, self).create(vals)
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index a50ea72..408c351 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.4
+Version: 2.2.5
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit 55c40c55e59d00d29a079944c3e1484d44524625
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 19:50:34 2013 +0100

    Merging upstream version 2.2.4.

diff --git a/CHANGELOG b/CHANGELOG
index e5a7327..39fa2d2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.4 - 2012-11-05
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.3 - 2012-09-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 6f94c8d..2c561cf 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.3
+Version: 2.2.4
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index da1be26..6e7d228 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.3',
+    'version': '2.2.4',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/product.py b/product.py
index fdd5f4f..0abfb8d 100644
--- a/product.py
+++ b/product.py
@@ -478,16 +478,21 @@ class Product(ModelSQL, ModelView):
                 if location.parent.id in leafs:
                     leafs.remove(location.parent.id)
                 parent[location.id] = location.parent.id
-
+            locations = set((l.id for l in locations))
             while leafs:
-                next_leafs = set()
                 for l in leafs:
+                    locations.remove(l)
                     if l not in parent:
                         continue
-                    next_leafs.add(parent[l])
                     for product in res_product_ids:
                         res.setdefault((parent[l], product), 0)
                         res[(parent[l], product)] += res.get((l,product), 0)
+                next_leafs = set(locations)
+                for l in locations:
+                    if l not in parent:
+                        continue
+                    if parent[l] in next_leafs and parent[l] in locations:
+                        next_leafs.remove(parent[l])
                 leafs = next_leafs
 
             # clean result
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index 3448616..a50ea72 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.3
+Version: 2.2.4
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit 34096d3a996b590c1c485ebb198b4430886b7934
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Oct 3 23:00:00 2012 +0200

    Releasing debian version 2.2.3-1.

diff --git a/debian/changelog b/debian/changelog
index 01609a5..6260b2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-stock (2.2.3-1) unstable; urgency=low
+
+  * Merging upstream version 2.2.3.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 03 Oct 2012 21:52:25 +0200
+
 tryton-modules-stock (2.2.2-2) unstable; urgency=low
 
   * Updating maintainers field.
commit 12fd056add16fbcfc7ce1ad9aabca424f0755e7f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Sep 11 19:36:41 2012 +0200

    Merging upstream version 2.2.3.

diff --git a/CHANGELOG b/CHANGELOG
index dd046e9..e5a7327 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.3 - 2012-09-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.2 - 2012-05-07
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 2475c99..6f94c8d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.0
 Name: trytond_stock
-Version: 2.2.2
+Version: 2.2.3
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index 658437e..da1be26 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.2',
+    'version': '2.2.3',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/location.py b/location.py
index 0f14437..e055796 100644
--- a/location.py
+++ b/location.py
@@ -138,7 +138,7 @@ class Location(ModelSQL, ModelView):
             ], order=[])
         if ids:
             return [('id', 'in', ids)]
-        return [(self._rec_name,) + clause[1:]]
+        return [(self._rec_name,) + tuple(clause[1:])]
 
     def get_quantity(self, ids, name):
         product_obj = Pool().get('product.product')
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index c05e229..3448616 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.0
 Name: trytond-stock
-Version: 2.2.2
+Version: 2.2.3
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
commit a8e437aba1a19b4a8b4a9786626dfb50dbd57675
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jun 30 18:31:21 2012 +0200

    Releasing debian version 2.2.2-2.

diff --git a/debian/changelog b/debian/changelog
index 3a7a225..01609a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tryton-modules-stock (2.2.2-2) unstable; urgency=low
+
+  * Updating maintainers field.
+  * Updating vcs fields.
+  * Correcting copyright file to match format version 1.0.
+  * Switching to xz compression.
+  * Updating to debhelper version 9.
+
+ -- Daniel Baumann <daniel at debian.org>  Sat, 30 Jun 2012 18:30:56 +0200
+
 tryton-modules-stock (2.2.2-1) unstable; urgency=low
 
   * Updating to Standards-Version: 3.9.3, no changes needed.
commit 29d1283ae9b10bea287dc9b3f1fafcf63f265d0a
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jun 30 18:02:29 2012 +0200

    Updating to debhelper version 9.

diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index 0fa100b..8636dfe 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
 Dm-Upload-Allowed: yes
-Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
+Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
 Standards-Version: 3.9.3
 Homepage: http://www.tryton.org/
 Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-stock.git
commit 3a6cbf9e74e26d4b1f011906c6231e31e4738e5c
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jun 30 17:54:37 2012 +0200

    Switching to xz compression.

diff --git a/debian/rules b/debian/rules
index e32b791..1ae0776 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,3 +7,6 @@ override_dh_auto_clean:
 	dh_auto_clean
 
 	rm -rf *.egg-info
+
+override_dh_builddeb:
+	dh_builddeb -- -Zxz -z9
diff --git a/debian/source/options b/debian/source/options
index d053b65..22a4de9 100644
--- a/debian/source/options
+++ b/debian/source/options
@@ -1,2 +1,2 @@
-compression = gzip
+compression = xz
 compression-level = 9
commit df9676804eb969122e595a3ca1f4eec2279abc2f
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jun 30 17:50:24 2012 +0200

    Correcting copyright file to match format version 1.0.

diff --git a/debian/copyright b/debian/copyright
index f1138f5..932fa84 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,11 +2,11 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
 Copyright:
- (C) 2004-2008 Tiny SPRL
- (C) 2008-2012 Cedric Krier
- (C) 2008-2011 Bertrand Chenal
- (C) 2008-2012 B2CK SPRL
- (C) 2012 Openlabs Technologies & Consulting (P) LTD
+           2004-2008 Tiny SPRL
+           2008-2012 Cedric Krier
+           2008-2011 Bertrand Chenal
+           2008-2012 B2CK SPRL
+           2012 Openlabs Technologies & Consulting (P) LTD
 License: GPL-3+
 
 Files: icons/*
@@ -15,8 +15,8 @@ License: public-domain
 
 Files: debian/*
 Copyright:
- (C) 2009-2012 Daniel Baumann <daniel at debian.org>
- (C) 2011-2012 Mathias Behrle <mathiasb at m9s.biz>
+           2009-2012 Daniel Baumann <daniel at debian.org>
+           2011-2012 Mathias Behrle <mathiasb at m9s.biz>
 License: GPL-3+
 
 License: GPL-3+
commit f9d81a66bd376cbda8d797b4182891a2a1682221
Author: Daniel Baumann <daniel at 127011.net>
Date:   Sat Jun 30 16:55:04 2012 +0200

    Updating vcs fields.

diff --git a/debian/control b/debian/control
index 7945cee..0fa100b 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,8 @@ Dm-Upload-Allowed: yes
 Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
 Standards-Version: 3.9.3
 Homepage: http://www.tryton.org/
-Vcs-Browser: http://git.debian-maintainers.org/?p=tryton/tryton-modules-stock.git
-Vcs-Git: git://git.debian-maintainers.org/git/tryton/tryton-modules-stock.git
+Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-stock.git
+Vcs-Git: git://debian.tryton.org/git/packages/tryton-modules-stock.git
 X-Python-Version: >= 2.6
 
 Package: tryton-modules-stock
commit 94e780867d85da1c6d77664ed3ebdf959029211f
Author: Daniel Baumann <daniel at 127011.net>
Date:   Sat Jun 30 16:52:31 2012 +0200

    Updating maintainers field.

diff --git a/debian/control b/debian/control
index 04c4188..7945cee 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
 Source: tryton-modules-stock
 Section: python
 Priority: optional
-Maintainer: Debian Tryton Maintainers <tryton at lists.debian-maintainers.org>
+Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Daniel Baumann <daniel at debian.org>, Mathias Behrle <mathiasb at m9s.biz>
 Dm-Upload-Allowed: yes
 Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~), python-setuptools
commit 4c2ff24bccce7fd47799503a8a2921b0ececc5b6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 9 13:13:24 2012 +0200

    Releasing debian version 2.2.2-1.

diff --git a/debian/changelog b/debian/changelog
index 7b9d30b..3a7a225 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tryton-modules-stock (2.2.2-1) unstable; urgency=low
+
+  * Updating to Standards-Version: 3.9.3, no changes needed.
+  * Updating year in copyright.
+  * Adding Format header for DEP5.
+  * Merging upstream version 2.2.2.
+  * Updating copyright.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 09 May 2012 11:55:19 +0200
+
 tryton-modules-stock (2.2.1-1) unstable; urgency=low
 
   * Merging upstream version 2.2.1.
commit 7a7feb2152d283e2bcdf38fa348af791df119e2a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 9 11:55:12 2012 +0200

    Updating copyright.

diff --git a/debian/copyright b/debian/copyright
index 165d163..f1138f5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,9 +3,10 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Files: *
 Copyright:
  (C) 2004-2008 Tiny SPRL
- (C) 2008-2011 Cedric Krier
+ (C) 2008-2012 Cedric Krier
  (C) 2008-2011 Bertrand Chenal
- (C) 2008-2011 B2CK SPRL
+ (C) 2008-2012 B2CK SPRL
+ (C) 2012 Openlabs Technologies & Consulting (P) LTD
 License: GPL-3+
 
 Files: icons/*
commit cf75b575ce77157943ebbb9d61123180faa30a86
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 9 11:47:29 2012 +0200

    Merging upstream version 2.2.2.

diff --git a/CHANGELOG b/CHANGELOG
index e8e2ee7..dd046e9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.2 - 2012-05-07
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.1 - 2011-12-26
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index a9feb41..101ffe2 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,7 @@
-Copyright (C) 2008-2011 Cédric Krier.
+Copyright (C) 2012 Openlabs Technologies & Consulting (P) LTD.
+Copyright (C) 2008-2012 Cédric Krier.
 Copyright (C) 2008-2011 Bertrand Chenal.
-Copyright (C) 2008-2011 B2CK SPRL.
+Copyright (C) 2008-2012 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index 3fdd532..2475c99 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 2.2.1
+Version: 2.2.2
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
diff --git a/__tryton__.py b/__tryton__.py
index 432f5c7..658437e 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_ES': 'Gestión de existencias',
     'name_fr_FR': 'Gestion des stocks',
     'name_ru_RU': 'Управление складами',
-    'version': '2.2.1',
+    'version': '2.2.2',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/move.py b/move.py
index 0352926..735eec3 100644
--- a/move.py
+++ b/move.py
@@ -456,6 +456,8 @@ class Move(ModelSQL, ModelView):
 
         if isinstance(uom, (int, long)):
             uom = uom_obj.browse(uom)
+        if isinstance(currency, (int, long)):
+            currency = currency_obj.browse(currency)
         if isinstance(company, (int, long)):
             company = company_obj.browse(company)
 
@@ -517,18 +519,20 @@ class Move(ModelSQL, ModelView):
         product = product_obj.browse(vals['product'])
         if vals.get('state') == 'done':
             vals['effective_date'] = effective_date
+            currency_id = vals.get('currency', self.default_currency())
+            company_id = vals.get('company', self.default_company())
             from_location = location_obj.browse(vals['from_location'])
             to_location = location_obj.browse(vals['to_location'])
             if from_location.type == 'supplier' \
                     and product.cost_price_method == 'average':
                 self._update_product_cost_price(vals['product'],
                         vals['quantity'], vals['uom'], vals['unit_price'],
-                        vals['currency'], vals['company'], effective_date)
+                        currency_id, company_id, effective_date)
             if to_location.type == 'supplier' \
                     and product.cost_price_method == 'average':
                 self._update_product_cost_price(vals['product'],
                         -vals['quantity'], vals['uom'], vals['unit_price'],
-                        vals['currency'], vals['company'], effective_date)
+                        currency_id, company_id, effective_date)
             if not vals.get('cost_price'):
                 # Re-read product to get the updated cost_price
                 product = product_obj.browse(vals['product'])
diff --git a/product.py b/product.py
index ca79200..fdd5f4f 100644
--- a/product.py
+++ b/product.py
@@ -495,6 +495,14 @@ class Product(ModelSQL, ModelView):
                 if location not in location_ids:
                     del res[(location, product)]
 
+        # Round quantities
+        default_uom = dict((p.id, p.default_uom) for p in
+            self.browse(list(res_product_ids)))
+        for key, quantity in res.iteritems():
+            location, product = key
+            uom = default_uom[product]
+            res[key] = uom_obj.round(quantity, uom.rounding)
+
         # Complete result with missing products if asked
         if not skip_zero:
             # Search for all products, even if not linked with moves
diff --git a/shipment.py b/shipment.py
index 00150d4..d24a423 100644
--- a/shipment.py
+++ b/shipment.py
@@ -9,6 +9,7 @@ from trytond.backend import TableHandler
 from trytond.pyson import Eval, Not, Equal, If, Or, And, Bool, In, Get
 from trytond.transaction import Transaction
 from trytond.pool import Pool
+from trytond.tools import reduce_ids
 
 STATES = {
     'readonly': "state in ('cancel', 'done')",
@@ -159,7 +160,12 @@ class ShipmentIn(ModelWorkflow, ModelSQL, ModelView):
             for company_id, values in itertools.groupby(cursor.fetchall(),
                     operator.itemgetter(1)):
                 shipment_ids = [x[0] for x in values]
-                self.write(shipment_ids, {'company': company_id})
+                for i in range(0, len(shipment_ids), cursor.IN_MAX):
+                    sub_ids = shipment_ids[i:i + cursor.IN_MAX]
+                    red_sql, red_ids = reduce_ids('id', sub_ids)
+                    cursor.execute('UPDATE "' + self._table + '" '
+                        'SET company = %s WHERE ' + red_sql,
+                        [company_id] + red_ids)
             table.not_null_action('company', action='add')
 
         # Add index on create_date
@@ -520,7 +526,12 @@ class ShipmentInReturn(ModelWorkflow, ModelSQL, ModelView):
             for company_id, values in itertools.groupby(cursor.fetchall(),
                     operator.itemgetter(1)):
                 shipment_ids = [x[0] for x in values]
-                self.write(shipment_ids, {'company': company_id})
+                for i in range(0, len(shipment_ids), cursor.IN_MAX):
+                    sub_ids = shipment_ids[i:i + cursor.IN_MAX]
+                    red_sql, red_ids = reduce_ids('id', sub_ids)
+                    cursor.execute('UPDATE "' + self._table + '" '
+                        'SET company = %s WHERE ' + red_sql,
+                        [company_id] + red_ids)
             table.not_null_action('company', action='add')
 
         # Add index on create_date
@@ -797,7 +808,12 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
             for company_id, values in itertools.groupby(cursor.fetchall(),
                     operator.itemgetter(1)):
                 shipment_ids = [x[0] for x in values]
-                self.write(shipment_ids, {'company': company_id})
+                for i in range(0, len(shipment_ids), cursor.IN_MAX):
+                    sub_ids = shipment_ids[i:i + cursor.IN_MAX]
+                    red_sql, red_ids = reduce_ids('id', sub_ids)
+                    cursor.execute('UPDATE "' + self._table + '" '
+                        'SET company = %s WHERE ' + red_sql,
+                        [company_id] + red_ids)
             table.not_null_action('company', action='add')
 
         # Migration from 1.0 customer_location is no more used
@@ -1018,12 +1034,12 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
             if outgoing_qty.get(move.product.id, 0.0) > 0.0:
                 exc_qty = uom_obj.compute_qty(move.product.default_uom,
                         outgoing_qty[move.product.id], move.uom)
-                move_obj.write(move.id,{
-                    'quantity': max(0.0, move.quantity-exc_qty),
-                    })
                 removed_qty = uom_obj.compute_qty(move.uom,
                         min(exc_qty, move.quantity), move.product.default_uom,
                         round=False)
+                move_obj.write(move.id,{
+                    'quantity': max(0.0, move.quantity-exc_qty),
+                    })
                 outgoing_qty[move.product.id] -= removed_qty
 
         move_obj.write([x.id for x in shipment.outgoing_moves
@@ -1286,7 +1302,12 @@ class ShipmentOutReturn(ModelWorkflow, ModelSQL, ModelView):
             for company_id, values in itertools.groupby(cursor.fetchall(),
                     operator.itemgetter(1)):
                 shipment_ids = [x[0] for x in values]
-                self.write(shipment_ids, {'company': company_id})
+                for i in range(0, len(shipment_ids), cursor.IN_MAX):
+                    sub_ids = shipment_ids[i:i + cursor.IN_MAX]
+                    red_sql, red_ids = reduce_ids('id', sub_ids)
+                    cursor.execute('UPDATE "' + self._table + '" '
+                        'SET company = %s WHERE ' + red_sql,
+                        [company_id] + red_ids)
             table.not_null_action('company', action='add')
 
         # Add index on create_date
@@ -1742,7 +1763,12 @@ class ShipmentInternal(ModelWorkflow, ModelSQL, ModelView):
             for company_id, values in itertools.groupby(cursor.fetchall(),
                     operator.itemgetter(1)):
                 shipment_ids = [x[0] for x in values]
-                self.write(shipment_ids, {'company': company_id})
+                for i in range(0, len(shipment_ids), cursor.IN_MAX):
+                    sub_ids = shipment_ids[i:i + cursor.IN_MAX]
+                    red_sql, red_ids = reduce_ids('id', sub_ids)
+                    cursor.execute('UPDATE "' + self._table + '" '
+                        'SET company = %s WHERE ' + red_sql,
+                        [company_id] + red_ids)
             table.not_null_action('company', action='add')
 
         # Add index on create_date
diff --git a/tests/test_stock.py b/tests/test_stock.py
index 1caa6f1..d81ba98 100644
--- a/tests/test_stock.py
+++ b/tests/test_stock.py
@@ -9,6 +9,7 @@ if os.path.isdir(DIR):
     sys.path.insert(0, os.path.dirname(DIR))
 
 import unittest
+import doctest
 import datetime
 from decimal import Decimal
 from dateutil.relativedelta import relativedelta
@@ -16,6 +17,7 @@ from functools import partial
 import trytond.tests.test_tryton
 from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
     test_depends
+from trytond.backend.sqlite.database import Database as SQLiteDatabase
 from trytond.transaction import Transaction
 
 
@@ -113,13 +115,14 @@ class StockTestCase(unittest.TestCase):
             category_id = self.category.create({
                 'name': 'Test products_by_location',
                 })
-            unit_id, = self.uom.search([('name', '=', 'Unit')])
+            kg_id, = self.uom.search([('name', '=', 'Kilogram')])
+            g_id, = self.uom.search([('name', '=', 'Gram')])
             product_id = self.product.create({
                 'name': 'Test products_by_location',
                 'type': 'stockable',
                 'category': category_id,
                 'cost_price_method': 'fixed',
-                'default_uom': unit_id,
+                'default_uom': kg_id,
                 })
             supplier_id, = self.location.search([('code', '=', 'SUP')])
             customer_id, = self.location.search([('code', '=', 'CUS')])
@@ -136,7 +139,7 @@ class StockTestCase(unittest.TestCase):
 
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 5,
                 'from_location': supplier_id,
                 'to_location': storage_id,
@@ -149,7 +152,7 @@ class StockTestCase(unittest.TestCase):
                 })
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 1,
                 'from_location': supplier_id,
                 'to_location': storage_id,
@@ -161,7 +164,7 @@ class StockTestCase(unittest.TestCase):
                 })
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 1,
                 'from_location': storage_id,
                 'to_location': customer_id,
@@ -174,7 +177,7 @@ class StockTestCase(unittest.TestCase):
                 })
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 1,
                 'from_location': storage_id,
                 'to_location': customer_id,
@@ -186,7 +189,7 @@ class StockTestCase(unittest.TestCase):
                 })
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 2,
                 'from_location': storage_id,
                 'to_location': customer_id,
@@ -198,7 +201,7 @@ class StockTestCase(unittest.TestCase):
                 })
             self.move.create({
                 'product': product_id,
-                'uom': unit_id,
+                'uom': kg_id,
                 'quantity': 5,
                 'from_location': supplier_id,
                 'to_location': storage_id,
@@ -290,6 +293,23 @@ class StockTestCase(unittest.TestCase):
                 today + relativedelta(days=-3),
                 today + relativedelta(days=-2),
             ]
+
+            self.move.create({
+                'product': product_id,
+                'uom': g_id,
+                'quantity': 1,
+                'from_location': supplier_id,
+                'to_location': storage_id,
+                'planned_date': today + relativedelta(days=-5),
+                'effective_date': today + relativedelta(days=-5),
+                'state': 'done',
+                'company': company_id,
+                'unit_price': Decimal('1'),
+                'currency': currency_id,
+                })
+            # Nothing should change when adding a small quantity
+            test_products_by_location()
+
             for period_date in periods:
                 period_id = self.period.create({
                     'date': period_date,
@@ -441,6 +461,19 @@ class StockTestCase(unittest.TestCase):
             self.assertRaises(Exception, self.period.button_close, [period_id])
 
 
+def doctest_dropdb(test):
+    '''
+    Remove sqlite memory database
+    '''
+    database = SQLiteDatabase().connect()
+    cursor = database.cursor(autocommit=True)
+    try:
+        database.drop(cursor, ':memory:')
+        cursor.commit()
+    finally:
+        cursor.close()
+
+
 def suite():
     suite = trytond.tests.test_tryton.suite()
     from trytond.modules.company.tests import test_company
@@ -448,6 +481,10 @@ def suite():
         if test not in suite:
             suite.addTest(test)
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(StockTestCase))
+    suite.addTests(doctest.DocFileSuite('scenario_stock_shipment_out.rst',
+        setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
+
     return suite
 
 if __name__ == '__main__':
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index 03a5b48..c05e229 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 2.2.1
+Version: 2.2.2
 Summary: Stock Management and Inventory Control with:
     - Location definition
     - Stock move
-- 
tryton-modules-stock



More information about the tryton-debian-vcs mailing list