[tryton-debian-vcs] tryton-modules-sale-supply-drop-shipment branch upstream-4.2 updated. upstream/4.2.1-1-g61b596e

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Jun 11 22:38:17 UTC 2017


The following commit has been merged in the upstream-4.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale-supply-drop-shipment.git;a=commitdiff;h=upstream/4.2.1-1-g61b596e

commit 61b596e8e9e1cc6a1730a2d9c60273b612bfa6df
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jun 11 22:37:57 2017 +0200

    Adding upstream version 4.2.2.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index c01f990..daa613e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.2 - 2017-06-06
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.1 - 2017-03-10
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index b1c3b53..4de4401 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_sale_supply_drop_shipment
-Version: 4.2.1
+Version: 4.2.2
 Summary: Tryton module for sale supply drop shipment
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/stock.py b/stock.py
index 64508bf..e488ad4 100644
--- a/stock.py
+++ b/stock.py
@@ -3,6 +3,7 @@
 from collections import defaultdict
 from decimal import Decimal
 
+from sql import Column
 from sql.operators import Concat
 from sql.aggregate import Count
 
@@ -10,7 +11,7 @@ from trytond.model import Workflow, ModelView, ModelSQL, fields
 from trytond.pyson import Eval, If
 from trytond.pool import Pool, PoolMeta
 from trytond.transaction import Transaction
-from trytond.tools import grouped_slice
+from trytond.tools import grouped_slice, cursor_dict
 
 
 __all__ = ['Configuration', 'ShipmentDrop', 'Move']
@@ -160,12 +161,19 @@ class ShipmentDrop(Workflow, ModelSQL, ModelView):
                         values=[drop_shipment_location],
                         where=move.id.in_(sub_ids)))
 
-            create_move = move.insert(values=move.select(
-                    where=move.shipment.like('stock.shipment.drop,%')))
-            cursor.execute(*create_move)
+            cursor.execute(*move.select(limit=1))
+            moves = list(cursor_dict(cursor))
+            if moves:
+                move_columns = moves[0].keys()
+                columns = [Column(move, c) for c in move_columns if c != 'id']
+                create_move = move.insert(
+                    columns=columns, values=move.select(
+                        *columns,
+                        where=move.shipment.like('stock.shipment.drop,%')))
+                cursor.execute(*create_move)
 
             for move_id, customer_location, line_id in move_sales:
-                cursor.execute(move.update(
+                cursor.execute(*move.update(
                         columns=[move.origin, move.from_location,
                             move.to_location],
                         values=[Concat('sale.line,', str(line_id)),
diff --git a/tryton.cfg b/tryton.cfg
index c319309..a16c19d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.1
+version=4.2.2
 depends:
     company
     ir
diff --git a/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO b/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
index a6bb0e3..bda6ca2 100644
--- a/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
+++ b/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-sale-supply-drop-shipment
-Version: 4.2.1
+Version: 4.2.2
 Summary: Tryton module for sale supply drop shipment
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-sale-supply-drop-shipment



More information about the tryton-debian-vcs mailing list