[tryton-debian-vcs] tryton-modules-stock branch debian-stretch-3.6 updated. debian/3.6.3-1-2-g4a9d75f
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Nov 8 09:32:48 UTC 2016
The following commit has been merged in the debian-stretch-3.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock.git;a=commitdiff;h=debian/3.6.3-1-2-g4a9d75f
commit 4a9d75f9e089a1019eb1d6415cb31207c9ae21cd
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Nov 8 09:25:17 2016 +0100
Releasing debian version 3.6.4-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 5659c34..c2c3a3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-stock (3.6.4-1) unstable; urgency=medium
+
+ * Merging upstream version 3.6.4.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 08 Nov 2016 09:25:17 +0100
+
tryton-modules-stock (3.6.3-1) unstable; urgency=medium
* Merging upstream version 3.6.3.
commit 4436b009c0c2434115e5a03338daa22c1a8af4d9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Nov 8 09:25:17 2016 +0100
Merging upstream version 3.6.4.
diff --git a/CHANGELOG b/CHANGELOG
index 2ee7f65..4e9b489 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.6.4 - 2016-11-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.3 - 2016-09-03
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 8c634f0..a7913ce 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_stock
-Version: 3.6.3
+Version: 3.6.4
Summary: Tryton module for stock and inventory
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/move.py b/move.py
index 24b3f6f..601d3dd 100644
--- a/move.py
+++ b/move.py
@@ -4,6 +4,7 @@ import datetime
import operator
from decimal import Decimal
from functools import partial
+from itertools import groupby
from sql import Literal, Union, Column, Null
from sql.aggregate import Sum
@@ -493,19 +494,21 @@ class Move(Workflow, ModelSQL, ModelView):
@classmethod
def check_period_closed(cls, moves):
Period = Pool().get('stock.period')
- periods = Period.search([
- ('state', '=', 'closed'),
- ], order=[('date', 'DESC')], limit=1)
- if periods:
- period, = periods
- for move in moves:
- date = (move.effective_date if move.effective_date
- else move.planned_date)
- if date and date < period.date:
- cls.raise_user_error('period_closed', {
- 'move': move.rec_name,
- 'period': period.rec_name,
- })
+ for company, moves in groupby(moves, lambda m: m.company):
+ periods = Period.search([
+ ('state', '=', 'closed'),
+ ('company', '=', company.id),
+ ], order=[('date', 'DESC')], limit=1)
+ if periods:
+ period, = periods
+ for move in moves:
+ date = (move.effective_date if move.effective_date
+ else move.planned_date)
+ if date and date < period.date:
+ cls.raise_user_error('period_closed', {
+ 'move': move.rec_name,
+ 'period': period.rec_name,
+ })
def get_rec_name(self, name):
return ("%s%s %s"
diff --git a/tryton.cfg b/tryton.cfg
index 36c408a..2bb47e7 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.3
+version=3.6.4
depends:
company
currency
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index f4daaab..c74e471 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: 3.6.3
+Version: 3.6.4
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