diff --git a/modules/stock/supplier_restocking_list.fodt b/modules/stock/supplier_restocking_list.fodt index b8ea3b7870..ba32c77440 100644 --- a/modules/stock/supplier_restocking_list.fodt +++ b/modules/stock/supplier_restocking_list.fodt @@ -1,116 +1,142 @@ - - LibreOffice/5.2.7.2$Linux_X86_64 LibreOffice_project/20m0$Build-2Bertrand Chenal2009-03-26T13:54:482016-03-21T16:06:02.54015281351PT6H57M42S + + LibreOffice/7.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-2Bertrand Chenal2009-03-26T13:54:482023-08-26T12:16:39.65390099652PT7H1M13S - 0 + 25400 0 - 43760 - 21691 + 20189 + 23656 true false view2 - 2630 - 5313 + 10248 + 39167 0 - 0 - 43759 - 21689 + 25400 + 20188 + 49054 0 0 false 100 false + false + false + false false - true - true - true - 0 - true - true - - false - false - false false - false + false + true + true + true + true + true + false + 0 + false + false + false + false + false + true + false + false + false + false + false + true + true + true + false + false + false false - false - false false false false - false - false - true - false - true - true - false - false - false - false - - false - false - true - false - false - - false + false + true false - false - false + false true - 1829759 + false + false + false + true + 0 + 1 + true + false + + high-resolution + true + + + false + false + true + false + false + true + true + false + true + + true + 1836664 + + true + false + true + true + 0 + + false + false + false + false + false + true + 0 + false + false + false + false + true + false + false + false + + false false true - true - false - true - true - false - true - 0 - false - true - high-resolution - false - false - false - true - true - true - - true - false - false - true - false - false - false - - false - false - 1289861 - false - 1 - true - false false - 0 + false + false false false - - - false + false + false + false + false + 1289861 + false + false + false + false + false + false + true + true + false @@ -119,26 +145,26 @@ - - - - - - + + + + + + - - + + - + - - + + @@ -150,18 +176,18 @@ - - + + - + - + @@ -179,11 +205,19 @@ + + + + + + + + - - + + @@ -194,8 +228,8 @@ - - + + @@ -204,114 +238,114 @@ - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -332,27 +366,27 @@ - - - - - + + + + + - - - - - - - - + + + + + + + + @@ -360,6 +394,20 @@ + + + + + + + + + + + + + + @@ -369,27 +417,33 @@ + + + - - + + - + - + + + + - + <if test="company and company.header"> <for each="line in company.header.split('\n')"> <line> </for> </if> - <company.rec_name if company else ''> + <company.rec_name if company else ''> <if test="company and company.footer"> @@ -409,10 +463,20 @@ + - <for each="shipment in records"> - Restocking List - Shipment Number: <shipment.number> + <for each="shipment in records"> + <choose test="shipment.state"> + <when test="'draft'"> + Draft Restocking List + </when> + <when test="'cancelled'"> + Cancelled Restocking List + </when> + <otherwise> + Restocking List N°: <shipment.number> + </otherwise> + </choose> Reference: <shipment.origins or ''><', ' if (shipment.origins and shipment.reference) else ''><shipment.reference or ''> Supplier: <shipment.supplier.rec_name> Planned Date: <shipment.planned_date and format_date(shipment.planned_date, user.language) or ''> @@ -424,54 +488,54 @@ - From Location + From Location - To Location + To Location - Product + Product - Quantity + Quantity - + <for each="move in moves(shipment)"> - + - + - + <move.from_location.rec_name> - + <move.to_location.rec_name> - + <move.product.rec_name> - - <format_number_symbol(move.quantity, user.language, move.unit, digits=move.unit.digits)> + + <format_number_symbol(move.quantity, user.language, move.unit, digits=move.unit.digits)> - + </for> - + - + diff --git a/modules/stock/tests/scenario_stock_shipment_in.rst b/modules/stock/tests/scenario_stock_shipment_in.rst index 2fb7f77521..bbb5835b9d 100644 --- a/modules/stock/tests/scenario_stock_shipment_in.rst +++ b/modules/stock/tests/scenario_stock_shipment_in.rst @@ -5,7 +5,7 @@ Stock Shipment In Scenario Imports:: >>> from decimal import Decimal - >>> from proteus import Model + >>> from proteus import Model, Report >>> from trytond.tests.tools import activate_modules >>> from trytond.modules.company.tests.tools import ( ... create_company, get_company) @@ -79,6 +79,9 @@ Receive the shipment:: >>> all(m.state == 'draft' for m in shipment.inventory_moves) True + >>> restocking_list = Report('stock.shipment.in.restocking_list') + >>> _ = restocking_list.execute([shipment]) + Change inventory quantity and try to finish:: >>> inventory_move, = shipment.inventory_moves