Hello community, here is the log from the commit of package trytond_stock for openSUSE:Factory checked in at 2016-11-08 18:28:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond_stock (Old) and /work/SRC/openSUSE:Factory/.trytond_stock.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond_stock" Changes: -------- --- /work/SRC/openSUSE:Factory/trytond_stock/trytond_stock.changes 2016-09-30 15:32:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.trytond_stock.new/trytond_stock.changes 2016-11-08 18:28:25.000000000 +0100 @@ -1,0 +2,5 @@ +Sun Nov 6 19:41:51 UTC 2016 - [email protected] + +- version 3.8.4 + +------------------------------------------------------------------- Old: ---- trytond_stock-3.8.3.tar.gz New: ---- trytond_stock-3.8.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond_stock.spec ++++++ --- /var/tmp/diff_new_pack.CNjQ9X/_old 2016-11-08 18:28:27.000000000 +0100 +++ /var/tmp/diff_new_pack.CNjQ9X/_new 2016-11-08 18:28:27.000000000 +0100 @@ -19,7 +19,7 @@ %define majorver 3.8 Name: trytond_stock -Version: %{majorver}.3 +Version: %{majorver}.4 Release: 0 Summary: The "stock" module for the Tryton ERP system License: GPL-3.0 ++++++ trytond_stock-3.8.3.tar.gz -> trytond_stock-3.8.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-3.8.3/CHANGELOG new/trytond_stock-3.8.4/CHANGELOG --- old/trytond_stock-3.8.3/CHANGELOG 2016-09-03 12:34:31.000000000 +0200 +++ new/trytond_stock-3.8.4/CHANGELOG 2016-11-06 17:58:25.000000000 +0100 @@ -1,3 +1,6 @@ +Version 3.8.4 - 2016-11-06 +* Bug fixes (see mercurial logs for details) + Version 3.8.3 - 2016-09-03 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-3.8.3/PKG-INFO new/trytond_stock-3.8.4/PKG-INFO --- old/trytond_stock-3.8.3/PKG-INFO 2016-09-03 12:34:41.000000000 +0200 +++ new/trytond_stock-3.8.4/PKG-INFO 2016-11-06 17:58:36.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond_stock -Version: 3.8.3 +Version: 3.8.4 Summary: Tryton module for stock and inventory Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-3.8.3/move.py new/trytond_stock-3.8.4/move.py --- old/trytond_stock-3.8.3/move.py 2016-01-25 23:32:54.000000000 +0100 +++ new/trytond_stock-3.8.4/move.py 2016-11-06 17:58:11.000000000 +0100 @@ -5,6 +5,7 @@ from decimal import Decimal from functools import partial from collections import OrderedDict +from itertools import groupby from sql import Literal, Union, Column, Null from sql.aggregate import Sum @@ -502,19 +503,21 @@ @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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-3.8.3/tryton.cfg new/trytond_stock-3.8.4/tryton.cfg --- old/trytond_stock-3.8.3/tryton.cfg 2016-07-04 22:53:13.000000000 +0200 +++ new/trytond_stock-3.8.4/tryton.cfg 2016-09-03 12:34:58.000000000 +0200 @@ -1,5 +1,5 @@ [tryton] -version=3.8.3 +version=3.8.4 depends: company currency diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-3.8.3/trytond_stock.egg-info/PKG-INFO new/trytond_stock-3.8.4/trytond_stock.egg-info/PKG-INFO --- old/trytond_stock-3.8.3/trytond_stock.egg-info/PKG-INFO 2016-09-03 12:34:40.000000000 +0200 +++ new/trytond_stock-3.8.4/trytond_stock.egg-info/PKG-INFO 2016-11-06 17:58:35.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond-stock -Version: 3.8.3 +Version: 3.8.4 Summary: Tryton module for stock and inventory Home-page: http://www.tryton.org/ Author: Tryton
