Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond_stock for openSUSE:Factory checked in at 2023-09-07 21:13:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond_stock (Old) and /work/SRC/openSUSE:Factory/.trytond_stock.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond_stock" Thu Sep 7 21:13:34 2023 rev:35 rq:1109468 version:6.0.21 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond_stock/trytond_stock.changes 2023-06-29 17:29:42.678745386 +0200 +++ /work/SRC/openSUSE:Factory/.trytond_stock.new.1766/trytond_stock.changes 2023-09-07 21:15:02.818251275 +0200 @@ -1,0 +2,5 @@ +Thu Sep 7 08:07:37 UTC 2023 - Axel Braun <axel.br...@gmx.de> + +- Version 6.0.21 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond_stock-6.0.20.tar.gz trytond_stock-6.0.20.tar.gz.asc New: ---- trytond_stock-6.0.21.tar.gz trytond_stock-6.0.21.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond_stock.spec ++++++ --- /var/tmp/diff_new_pack.cSRrZx/_old 2023-09-07 21:15:04.010293888 +0200 +++ /var/tmp/diff_new_pack.cSRrZx/_new 2023-09-07 21:15:04.014294032 +0200 @@ -19,7 +19,7 @@ %define majorver 6.0 Name: trytond_stock -Version: %{majorver}.20 +Version: %{majorver}.21 Release: 0 Summary: The "stock" module for the Tryton ERP system License: GPL-3.0-only ++++++ trytond_stock-6.0.20.tar.gz -> trytond_stock-6.0.21.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/.readthedocs.yaml new/trytond_stock-6.0.21/.readthedocs.yaml --- old/trytond_stock-6.0.20/.readthedocs.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/trytond_stock-6.0.21/.readthedocs.yaml 2023-08-06 19:28:07.000000000 +0200 @@ -0,0 +1,7 @@ +version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3" +sphinx: + configuration: modules/stock/doc/conf.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/CHANGELOG new/trytond_stock-6.0.21/CHANGELOG --- old/trytond_stock-6.0.20/CHANGELOG 2023-06-21 19:13:04.000000000 +0200 +++ new/trytond_stock-6.0.21/CHANGELOG 2023-09-06 23:14:02.000000000 +0200 @@ -1,4 +1,9 @@ +Version 6.0.21 - 2023-09-06 +--------------------------- +* Bug fixes (see mercurial logs for details) + + Version 6.0.20 - 2023-06-21 --------------------------- * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/PKG-INFO new/trytond_stock-6.0.21/PKG-INFO --- old/trytond_stock-6.0.20/PKG-INFO 2023-06-21 19:13:08.249360800 +0200 +++ new/trytond_stock-6.0.21/PKG-INFO 2023-09-06 23:14:06.580664600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond_stock -Version: 6.0.20 +Version: 6.0.21 Summary: Tryton module for stock and inventory Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/shipment.py new/trytond_stock-6.0.21/shipment.py --- old/trytond_stock-6.0.20/shipment.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond_stock-6.0.21/shipment.py 2023-08-26 09:35:30.000000000 +0200 @@ -883,6 +883,7 @@ def assign_try(cls, shipments, with_childs=None): pool = Pool() Move = pool.get('stock.move') + shipments = [s for s in shipments if s.state == 'waiting'] to_assign = defaultdict(list) for shipment in shipments: location_type = shipment.from_location.type @@ -1368,7 +1369,7 @@ def active(move): return move.state != 'cancelled' - moves = [] + moves, imoves = [], [] for shipment in shipments: if shipment.warehouse_storage == shipment.warehouse_output: # Do not have inventory moves @@ -1376,6 +1377,7 @@ outgoing_moves = {m: m for m in shipment.outgoing_moves} inventory_qty = defaultdict(lambda: defaultdict(float)) + inventory_moves = defaultdict(lambda: defaultdict(list)) for move in filter(active, shipment.outgoing_moves): key = shipment._sync_move_key(move) inventory_qty[move][key] = 0 @@ -1386,6 +1388,7 @@ move.uom, move.quantity, move.product.default_uom, round=False) inventory_qty[outgoing_move][key] += qty_default_uom + inventory_moves[outgoing_move][key].append(move) for outgoing_move in inventory_qty: if outgoing_move: @@ -1401,13 +1404,17 @@ move = shipment._sync_outgoing_move(outgoing_move) for name, value in key: setattr(move, name, value) + for imove in inventory_moves[outgoing_move][key]: + imove.origin = move + imoves.append(imove) qty = Uom.compute_qty( move.product.default_uom, qty, move.uom) if quantity and move.quantity != qty: move.quantity = qty - moves.append(move) + moves.append(move) Move.save(moves) + Move.save(imoves) @classmethod @ModelView.button @@ -1543,6 +1550,10 @@ @ModelView.button def assign_try(cls, shipments): Move = Pool().get('stock.move') + shipments = [ + s for s in shipments + if s.state == 'waiting' + and s.warehouse_storage != s.warehouse_output] to_assign = [ m for s in shipments for m in s.assign_moves if m.assignation_required] @@ -2427,13 +2438,14 @@ def active(move): return move.state != 'cancelled' - moves = [] + moves, omoves = [], [] for shipment in shipments: if not shipment.transit_location: continue incoming_moves = {m: m for m in shipment.incoming_moves} - outgoing_qty = defaultdict(lambda: defaultdict(lambda: 0)) + outgoing_qty = defaultdict(lambda: defaultdict(float)) + outgoing_moves = defaultdict(lambda: defaultdict(list)) for move in filter(active, shipment.incoming_moves): key = shipment._sync_move_key(move) outgoing_qty[move][key] = 0 @@ -2444,6 +2456,7 @@ move.uom, move.quantity, move.product.default_uom, round=False) outgoing_qty[incoming_move][key] += qty_default_uom + outgoing_moves[incoming_move][key].append(move) for incoming_move in outgoing_qty: if incoming_move: @@ -2455,13 +2468,18 @@ move = shipment._sync_incoming_move(incoming_move) for name, value in key: setattr(move, name, value) + for omove in outgoing_moves[incoming_move][key]: + omove.origin = move + omoves.append(omove) qty = Uom.compute_qty( move.product.default_uom, qty, move.uom) if move.quantity != qty: move.quantity = qty - moves.append(move) + moves.append(move) + # Save incoming moves first to get id for outgoing moves Move.save(moves) + Move.save(omoves) @classmethod def _set_transit(cls, shipments): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/tests/scenario_stock_shipment_out.rst new/trytond_stock-6.0.21/tests/scenario_stock_shipment_out.rst --- old/trytond_stock-6.0.20/tests/scenario_stock_shipment_out.rst 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond_stock-6.0.21/tests/scenario_stock_shipment_out.rst 2023-08-26 09:33:54.000000000 +0200 @@ -250,7 +250,20 @@ >>> shipment_out.click('assign_try') True >>> shipment_out.click('pick') + >>> len(shipment_out.inventory_moves) + 1 + >>> len(shipment_out.outgoing_moves) + 1 >>> shipment_out.click('pack') + >>> shipment_out.click('pick') + >>> len(shipment_out.inventory_moves) + 1 + >>> len(shipment_out.outgoing_moves) + 1 + >>> shipment_out.click('pack') + +Finish the shipment:: + >>> shipment_out.click('done') >>> shipment_out.state 'done' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/tryton.cfg new/trytond_stock-6.0.21/tryton.cfg --- old/trytond_stock-6.0.20/tryton.cfg 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond_stock-6.0.21/tryton.cfg 2023-06-21 19:13:17.000000000 +0200 @@ -1,5 +1,5 @@ [tryton] -version=6.0.20 +version=6.0.21 depends: company currency diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/trytond_stock.egg-info/PKG-INFO new/trytond_stock-6.0.21/trytond_stock.egg-info/PKG-INFO --- old/trytond_stock-6.0.20/trytond_stock.egg-info/PKG-INFO 2023-06-21 19:13:07.000000000 +0200 +++ new/trytond_stock-6.0.21/trytond_stock.egg-info/PKG-INFO 2023-09-06 23:14:05.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond-stock -Version: 6.0.20 +Version: 6.0.21 Summary: Tryton module for stock and inventory Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond_stock-6.0.20/trytond_stock.egg-info/SOURCES.txt new/trytond_stock-6.0.21/trytond_stock.egg-info/SOURCES.txt --- old/trytond_stock-6.0.20/trytond_stock.egg-info/SOURCES.txt 2023-06-21 19:13:08.000000000 +0200 +++ new/trytond_stock-6.0.21/trytond_stock.egg-info/SOURCES.txt 2023-09-06 23:14:06.000000000 +0200 @@ -1,3 +1,4 @@ +.readthedocs.yaml CHANGELOG COPYRIGHT LICENSE