[tryton-debian-vcs] tryton-modules-sale-supply-drop-shipment branch upstream-4.0 updated. upstream/4.0.3-1-ge068a6d
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.0 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.0.3-1-ge068a6d
commit e068a6d436d0d58a2ad6ebac16f59b8d0d66cc19
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Jun 11 22:36:40 2017 +0200
Adding upstream version 4.0.4.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 91fa9ad..85397bf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.4 - 2017-06-06
+* Bug fixes (see mercurial logs for details)
+
Version 4.0.3 - 2017-03-10
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index c426654..f466460 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_sale_supply_drop_shipment
-Version: 4.0.3
+Version: 4.0.4
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 6e35a21..1531e06 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 5a681a4..de42ed1 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.3
+version=4.0.4
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 24e5be9..44bb4b5 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.0.3
+Version: 4.0.4
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