Hello community, here is the log from the commit of package trytond_stock for openSUSE:Factory checked in at 2020-03-11 18:48:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond_stock (Old) and /work/SRC/openSUSE:Factory/.trytond_stock.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond_stock" Wed Mar 11 18:48:48 2020 rev:16 rq:783385 version:5.0.9 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond_stock/trytond_stock.changes 2020-02-10 21:53:21.554188862 +0100 +++ /work/SRC/openSUSE:Factory/.trytond_stock.new.3160/trytond_stock.changes 2020-03-11 18:50:54.223555695 +0100 @@ -1,0 +2,5 @@ +Tue Mar 10 13:01:01 UTC 2020 - Axel Braun <axel.br...@gmx.de> + +- Version 5.0.9 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond_stock-5.0.8.tar.gz New: ---- trytond_stock-5.0.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond_stock.spec ++++++ --- /var/tmp/diff_new_pack.0M4IjN/_old 2020-03-11 18:50:54.815555960 +0100 +++ /var/tmp/diff_new_pack.0M4IjN/_new 2020-03-11 18:50:54.819555962 +0100 @@ -19,7 +19,7 @@ %define majorver 5.0 Name: trytond_stock -Version: %{majorver}.8 +Version: %{majorver}.9 Release: 0 Summary: The "stock" module for the Tryton ERP system License: GPL-3.0-only ++++++ trytond_stock-5.0.8.tar.gz -> trytond_stock-5.0.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/.drone.yml new/trytond_stock-5.0.9/.drone.yml --- old/trytond_stock-5.0.8/.drone.yml 2019-04-10 18:58:35.000000000 +0200 +++ new/trytond_stock-5.0.9/.drone.yml 2020-03-01 16:46:08.000000000 +0100 @@ -19,6 +19,8 @@ services: postgresql: image: postgres + environment: + - POSTGRES_HOST_AUTH_METHOD=trust when: matrix: DATABASE: postgresql diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/.hgtags new/trytond_stock-5.0.9/.hgtags --- old/trytond_stock-5.0.8/.hgtags 2020-02-02 17:14:46.000000000 +0100 +++ new/trytond_stock-5.0.9/.hgtags 2020-03-09 18:34:29.000000000 +0100 @@ -27,3 +27,4 @@ f4e1cee034e62f75a9e27d1a93e3a21067ff1ca5 5.0.6 c28e197150589c730148a7abc40c96cfef65c5fd 5.0.7 858b2cb7a2710b1469be54a7cf4be780694f0c45 5.0.8 +e459804ec7619f9ee737d7fa1abdaacd4d4e1ddb 5.0.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/CHANGELOG new/trytond_stock-5.0.9/CHANGELOG --- old/trytond_stock-5.0.8/CHANGELOG 2020-02-02 17:14:45.000000000 +0100 +++ new/trytond_stock-5.0.9/CHANGELOG 2020-03-09 18:34:29.000000000 +0100 @@ -1,3 +1,6 @@ +Version 5.0.9 - 2020-03-09 +* Bug fixes (see mercurial logs for details) + Version 5.0.8 - 2020-02-02 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/PKG-INFO new/trytond_stock-5.0.9/PKG-INFO --- old/trytond_stock-5.0.8/PKG-INFO 2020-02-02 17:14:47.000000000 +0100 +++ new/trytond_stock-5.0.9/PKG-INFO 2020-03-09 18:34:31.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: trytond_stock -Version: 5.0.8 +Version: 5.0.9 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-5.0.8/move.py new/trytond_stock-5.0.9/move.py --- old/trytond_stock-5.0.8/move.py 2019-11-15 22:44:58.000000000 +0100 +++ new/trytond_stock-5.0.9/move.py 2020-02-25 22:01:35.000000000 +0100 @@ -43,16 +43,17 @@ def _quantity_context(cls, name): pool = Pool() Date = pool.get('ir.date') - + today = Date.today() context = Transaction().context new_context = {} + stock_date_end = context.get('stock_date_end') if name == 'quantity': - if (context.get('stock_date_end') - and context['stock_date_end'] > Date.today()): - new_context['stock_date_end'] = Date.today() + new_context['forecast'] = False + if (stock_date_end or datetime.date.max) > today: + new_context['stock_date_end'] = today elif name == 'forecast_quantity': new_context['forecast'] = True - if not context.get('stock_date_end'): + if not stock_date_end: new_context['stock_date_end'] = datetime.date.max return new_context diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/tests/test_stock.py new/trytond_stock-5.0.9/tests/test_stock.py --- old/trytond_stock-5.0.8/tests/test_stock.py 2019-04-10 18:58:35.000000000 +0200 +++ new/trytond_stock-5.0.9/tests/test_stock.py 2020-02-25 22:01:35.000000000 +0100 @@ -231,17 +231,32 @@ 'forecast': True, }, 6), ] + today_quantity = 4 def tests_product_quantity(context, quantity): with transaction.set_context(locations=[storage.id]): product_reloaded = Product(product.id) if (not context.get('stock_date_end') - or context['stock_date_end'] > today - or context.get('forecast')): - self.assertEqual(product_reloaded.forecast_quantity, - quantity) + or context['stock_date_end'] > today): + self.assertEqual( + product_reloaded.forecast_quantity, quantity, + msg='context %r' % context) + self.assertEqual( + product_reloaded.quantity, today_quantity, + msg='context %r' % context) + elif context.get('forecast'): + self.assertEqual( + product_reloaded.forecast_quantity, quantity, + msg='context %r' % context) + elif context.get('stock_date_end') == today: + self.assertEqual(product_reloaded.quantity, quantity, + msg='context %r' % context) else: - self.assertEqual(product_reloaded.quantity, quantity) + self.assertEqual( + product_reloaded.forecast_quantity, quantity, + msg='context %r' % context) + self.assertEqual(product_reloaded.quantity, quantity, + msg='context %r' % context) def tests_product_search_quantity(context, quantity): with transaction.set_context(locations=[storage.id]): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/tryton.cfg new/trytond_stock-5.0.9/tryton.cfg --- old/trytond_stock-5.0.8/tryton.cfg 2019-11-15 22:44:58.000000000 +0100 +++ new/trytond_stock-5.0.9/tryton.cfg 2020-02-02 17:14:59.000000000 +0100 @@ -1,5 +1,5 @@ [tryton] -version=5.0.8 +version=5.0.9 depends: company currency diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-5.0.8/trytond_stock.egg-info/PKG-INFO new/trytond_stock-5.0.9/trytond_stock.egg-info/PKG-INFO --- old/trytond_stock-5.0.8/trytond_stock.egg-info/PKG-INFO 2020-02-02 17:14:47.000000000 +0100 +++ new/trytond_stock-5.0.9/trytond_stock.egg-info/PKG-INFO 2020-03-09 18:34:30.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: trytond-stock -Version: 5.0.8 +Version: 5.0.9 Summary: Tryton module for stock and inventory Home-page: http://www.tryton.org/ Author: Tryton