fix test introduced on stock_quantity_to_zero patch
This commit is contained in:
parent
a52cd38b3c
commit
de26cc6f01
3
series
3
series
|
@ -19,7 +19,10 @@ sale_copy.diff # [sale] set _cache fields to null when copy
|
||||||
issue4482.diff # [stock] stock inventory misses company access rule
|
issue4482.diff # [stock] stock inventory misses company access rule
|
||||||
search_warehouse.diff # [stock] search function for warehouse
|
search_warehouse.diff # [stock] search function for warehouse
|
||||||
issue239_630.diff # [stock] get location quantity by product, product template or lot
|
issue239_630.diff # [stock] get location quantity by product, product template or lot
|
||||||
|
|
||||||
stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
|
stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
|
||||||
|
stock_quantity_to_zero_pass_test.diff # [stock] Ensure to sum with value.
|
||||||
|
# issue9737.diff # [stock] Delete outgoing_moves with zero quantity on packing customer shipment [not best solution for bug, solved on stock_quantity_to_zero]
|
||||||
|
|
||||||
issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's required on product
|
issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's required on product
|
||||||
production_view.diff #[production] Split inputs and outputs on pages
|
production_view.diff #[production] Split inputs and outputs on pages
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
diff --git a/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out.rst b/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out.rst
|
||||||
|
index 52d5b22..09a29ae 100644
|
||||||
|
--- a/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out.rst
|
||||||
|
+++ b/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out.rst
|
||||||
|
@@ -172,7 +172,7 @@ Delete the draft move, assign and pack shipment::
|
||||||
|
>>> all(m.state == 'assigned' for m in shipment_out.outgoing_moves)
|
||||||
|
True
|
||||||
|
>>> len(shipment_out.outgoing_moves)
|
||||||
|
- 2
|
||||||
|
+ 1
|
||||||
|
>>> len(shipment_out.inventory_moves)
|
||||||
|
1
|
||||||
|
>>> shipment_out.inventory_moves[0].state
|
||||||
|
@@ -190,14 +190,14 @@ Set the state as Done::
|
||||||
|
True
|
||||||
|
>>> planned_dates = [m.planned_date for m in
|
||||||
|
... shipment_out.outgoing_moves]
|
||||||
|
- >>> planned_dates == [today, today]
|
||||||
|
+ >>> planned_dates == [today]
|
||||||
|
True
|
||||||
|
>>> effective_dates = [m.effective_date for m in
|
||||||
|
... shipment_out.outgoing_moves]
|
||||||
|
>>> len(set(effective_dates))
|
||||||
|
1
|
||||||
|
>>> len(shipment_out.outgoing_moves)
|
||||||
|
- 2
|
||||||
|
+ 1
|
||||||
|
>>> len(shipment_out.inventory_moves)
|
||||||
|
1
|
||||||
|
>>> shipment_out.inventory_moves[0].state
|
||||||
|
|
||||||
|
diff --git a/trytond/trytond/modules/stock_lot/tests/scenario_stock_lot_shipment_out.rst b/trytond/trytond/modules/stock_lot/tests/scenario_stock_lot_shipment_out.rst
|
||||||
|
index ea2b371..edaba40 100644
|
||||||
|
--- a/trytond/trytond/modules/stock_lot/tests/scenario_stock_lot_shipment_out.rst
|
||||||
|
+++ b/trytond/trytond/modules/stock_lot/tests/scenario_stock_lot_shipment_out.rst
|
||||||
|
@@ -118,13 +118,13 @@ Pack the shipment::
|
||||||
|
>>> shipment_out.state
|
||||||
|
'packed'
|
||||||
|
>>> len(shipment_out.outgoing_moves)
|
||||||
|
- 3
|
||||||
|
+ 2
|
||||||
|
>>> sorted([m.quantity for m in shipment_out.outgoing_moves])
|
||||||
|
- [0.0, 3.0, 7.0]
|
||||||
|
+ [3.0, 7.0]
|
||||||
|
>>> lot_quantities = {}
|
||||||
|
>>> for move in shipment_out.outgoing_moves:
|
||||||
|
... number = move.lot.number if move.lot else ''
|
||||||
|
... quantity = lot_quantities.setdefault(number, 0)
|
||||||
|
... lot_quantities[number] += move.quantity
|
||||||
|
>>> sorted(lot_quantities.items())
|
||||||
|
- [('', 0.0), ('00001', 3.0), ('00002', 7.0)]
|
||||||
|
+ [('00001', 3.0), ('00002', 7.0)]
|
||||||
|
|
||||||
|
diff --git a/trytond/trytond/modules/stock_partial_shipment_out/ests/scenario_stock_shipment_out.rst b/trytond/trytond/modules/stock_partial_shipment_out/tests/scenario_stock_shipment_out.rst
|
||||||
|
index 321b6a9..4991c9d 100644
|
||||||
|
--- a/trytond/trytond/modules/stock_partial_shipment_out/tests/scenario_stock_shipment_out.rst
|
||||||
|
+++ b/trytond/trytond/modules/stock_partial_shipment_out/tests/scenario_stock_shipment_out.rst
|
||||||
|
@@ -127,7 +127,3 @@ Create Shipment Out::
|
||||||
|
1
|
||||||
|
>>> len(shipment_out.outgoing_moves)
|
||||||
|
2
|
||||||
|
- >>> shipment_out.click('pack')
|
||||||
|
- >>> outgoing_move1, outgoing_move2 = shipment_out.outgoing_moves
|
||||||
|
- >>> outgoing_move1.quantity == 0
|
||||||
|
- True
|
Loading…
Reference in New Issue