[tryton-debian-vcs] tryton-modules-stock branch debian updated. debian/4.0.1-1-3-gfd0ec72
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Jul 12 13:06:04 UTC 2016
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock.git;a=commitdiff;h=debian/4.0.1-1-3-gfd0ec72
commit fd0ec725da14e1650935ed70975a19c5bfa793a3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Jul 11 20:33:53 2016 +0200
Releasing debian version 4.0.2-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index d48dacd..11f4df7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-stock (4.0.2-1) unstable; urgency=medium
+
+ * Updating to Standards-Version: 3.9.8, no changes needed.
+ * Merging upstream version 4.0.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Mon, 11 Jul 2016 20:33:53 +0200
+
tryton-modules-stock (4.0.1-1) unstable; urgency=medium
* Updating signing-key.asc with the actual upstream maintainer keys.
commit bb8d2b5e44cc2449837bff273f5b67802613f652
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Jul 11 20:33:52 2016 +0200
Merging upstream version 4.0.2.
diff --git a/CHANGELOG b/CHANGELOG
index e779da6..cfd3b92 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.2 - 2016-07-04
+* Bug fixes (see mercurial logs for details)
+
Version 4.0.1 - 2016-05-11
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 1f061f8..56abd43 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_stock
-Version: 4.0.1
+Version: 4.0.2
Summary: Tryton module for stock and inventory
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/location.py b/location.py
index cbfac48..75e86c7 100644
--- a/location.py
+++ b/location.py
@@ -207,10 +207,11 @@ class Location(ModelSQL, ModelView):
def get_warehouse(self, name):
# Order by descending left to get the first one in the tree
- locations = self.search([
- ('parent', 'parent_of', [self.id]),
- ('type', '=', 'warehouse'),
- ], order=[('left', 'DESC')])
+ with Transaction().set_context(active_test=False):
+ locations = self.search([
+ ('parent', 'parent_of', [self.id]),
+ ('type', '=', 'warehouse'),
+ ], order=[('left', 'DESC')])
if locations:
return locations[0].id
diff --git a/shipment.py b/shipment.py
index b9a4d6a..6ef8259 100644
--- a/shipment.py
+++ b/shipment.py
@@ -538,8 +538,15 @@ class ShipmentInReturn(Workflow, ModelSQL, ModelView):
& Eval('to_location')),
},
domain=[
- ('from_location', '=', Eval('from_location')),
- ('to_location', '=', Eval('to_location')),
+ If(Eval('state') == 'draft', [
+ ('from_location', '=', Eval('from_location')),
+ ('to_location', '=', Eval('to_location')),
+ ], [
+ ('from_location', 'child_of', [Eval('from_location', -1)],
+ 'parent'),
+ ('to_location', 'child_of', [Eval('to_location', -1)],
+ 'parent'),
+ ]),
('company', '=', Eval('company')),
],
depends=['state', 'from_location', 'to_location', 'company'])
@@ -725,6 +732,13 @@ class ShipmentInReturn(Workflow, ModelSQL, ModelView):
Move = Pool().get('stock.move')
Move.draft([m for s in shipments for m in s.moves
if m.state != 'staging'])
+ for shipment in shipments:
+ Move.write([m for m in shipment.moves
+ if m.state != 'done'], {
+ 'from_location': shipment.from_location.id,
+ 'to_location': shipment.to_location.id,
+ 'planned_date': shipment.planned_date,
+ })
@classmethod
@ModelView.button
diff --git a/tryton.cfg b/tryton.cfg
index 06a5651..70c37dc 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.1
+version=4.0.2
depends:
company
currency
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index ee8a9e6..4027549 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: 4.0.1
+Version: 4.0.2
Summary: Tryton module for stock and inventory
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-stock
More information about the tryton-debian-vcs
mailing list