diff --git a/modules/account_invoice_stock/tests/scenario_account_invoice_stock.rst b/modules/account_invoice_stock/tests/scenario_account_invoice_stock.rst index 4c823b2b4f..3ac43ac677 100644 --- a/modules/account_invoice_stock/tests/scenario_account_invoice_stock.rst +++ b/modules/account_invoice_stock/tests/scenario_account_invoice_stock.rst @@ -112,7 +112,7 @@ Ship the products:: >>> shipment.click('assign_force') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon.rst b/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon.rst index 2d8677df0c..fd9face77e 100644 --- a/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon.rst +++ b/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon.rst @@ -171,7 +171,7 @@ Receive 9 products:: >>> shipment.incoming_moves.append(move) >>> move.quantity = 5.0 >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> stock_in.reload() @@ -252,7 +252,7 @@ Send 5 products:: >>> shipment.click('pack') >>> shipment.state 'packed' - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> stock_out.reload() @@ -380,7 +380,7 @@ Now we will use a product with different unit of measure:: 0.0 >>> shipment.incoming_moves.append(move) >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> set_user(accountant) >>> purchase.reload() diff --git a/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst b/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst index 958d4dfe89..85a9836f02 100644 --- a/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst +++ b/modules/account_stock_anglo_saxon/tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst @@ -192,7 +192,7 @@ Receive 50 products:: >>> set_user(stock_user) >>> shipment.click('ship') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> set_user(account_user) diff --git a/modules/account_stock_continental/tests/scenario_account_stock_continental.rst b/modules/account_stock_continental/tests/scenario_account_stock_continental.rst index a00267bcd2..0964693581 100644 --- a/modules/account_stock_continental/tests/scenario_account_stock_continental.rst +++ b/modules/account_stock_continental/tests/scenario_account_stock_continental.rst @@ -141,7 +141,7 @@ Receive 9 products:: >>> shipment.incoming_moves.append(move) >>> move.quantity = 5.0 >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> stock_in.reload() @@ -213,7 +213,7 @@ Send 5 products:: >>> shipment.click('pack') >>> shipment.state 'packed' - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> stock_out.reload() @@ -315,7 +315,7 @@ Create Drop Shipment Move:: >>> shipment, = sale.drop_shipments >>> shipment.click('ship') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -367,7 +367,7 @@ Create Drop Shipment Move:: >>> shipment, = sale.drop_shipments >>> shipment.click('ship') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/account_stock_eu/tests/scenario_account_stock_eu_arrival.rst b/modules/account_stock_eu/tests/scenario_account_stock_eu_arrival.rst index 9a00fdf9d1..53e1da4ec6 100644 --- a/modules/account_stock_eu/tests/scenario_account_stock_eu_arrival.rst +++ b/modules/account_stock_eu/tests/scenario_account_stock_eu_arrival.rst @@ -134,7 +134,7 @@ Receive products from Belgium:: >>> move.unit_price = Decimal('100.0000') >>> move.currency = eur >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -156,7 +156,7 @@ Receive products from France:: >>> move.unit_price = Decimal('90.0000') >>> move.currency = eur >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -196,7 +196,7 @@ Receive products from US:: >>> move.unit_price = Decimal('120.0000') >>> move.currency = usd >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -218,7 +218,7 @@ Receive returned products from France:: >>> move.unit_price = Decimal('150.0000') >>> move.currency = eur >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/account_stock_eu/tests/scenario_account_stock_eu_dispatch.rst b/modules/account_stock_eu/tests/scenario_account_stock_eu_dispatch.rst index 9bb7d3a6d0..34a84a83a6 100644 --- a/modules/account_stock_eu/tests/scenario_account_stock_eu_dispatch.rst +++ b/modules/account_stock_eu/tests/scenario_account_stock_eu_dispatch.rst @@ -137,7 +137,7 @@ Send products to Belgium:: >>> shipment.click('wait') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -161,7 +161,7 @@ Send products to particular to France:: >>> shipment.click('wait') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -205,7 +205,7 @@ Send products to US:: >>> shipment.click('wait') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -229,7 +229,7 @@ Send returned products to France:: >>> move.currency = eur >>> shipment.click('wait') >>> shipment.click('assign_force') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/account_stock_shipment_cost/tests/scenario_account_stock_shipment_cost.rst b/modules/account_stock_shipment_cost/tests/scenario_account_stock_shipment_cost.rst index 7b9ae7595c..1ff7f3dba8 100644 --- a/modules/account_stock_shipment_cost/tests/scenario_account_stock_shipment_cost.rst +++ b/modules/account_stock_shipment_cost/tests/scenario_account_stock_shipment_cost.rst @@ -112,7 +112,7 @@ Ship twice 10 unit of the product:: >>> shipment1.click('assign_force') >>> shipment1.click('pick') >>> shipment1.click('pack') - >>> shipment1.click('done') + >>> shipment1.click('do') >>> shipment1.state 'done' @@ -121,7 +121,7 @@ Ship twice 10 unit of the product:: >>> shipment2.click('assign_force') >>> shipment2.click('pick') >>> shipment2.click('pack') - >>> shipment2.click('done') + >>> shipment2.click('do') >>> shipment2.state 'done' diff --git a/modules/account_stock_shipment_cost_weight/tests/scenario_account_stock_shipment_cost_weight.rst b/modules/account_stock_shipment_cost_weight/tests/scenario_account_stock_shipment_cost_weight.rst index 1736df8842..6691c9b179 100644 --- a/modules/account_stock_shipment_cost_weight/tests/scenario_account_stock_shipment_cost_weight.rst +++ b/modules/account_stock_shipment_cost_weight/tests/scenario_account_stock_shipment_cost_weight.rst @@ -112,7 +112,7 @@ Ship 20 units of the product in two shipments:: >>> shipment1.click('assign_force') >>> shipment1.click('pick') >>> shipment1.click('pack') - >>> shipment1.click('done') + >>> shipment1.click('do') >>> shipment1.state 'done' @@ -123,7 +123,7 @@ Ship 20 units of the product in two shipments:: >>> shipment2.click('assign_force') >>> shipment2.click('pick') >>> shipment2.click('pack') - >>> shipment2.click('done') + >>> shipment2.click('do') >>> shipment2.state 'done' diff --git a/modules/carrier_carriage/stock.py b/modules/carrier_carriage/stock.py index c735e3ccbb..0017350550 100644 --- a/modules/carrier_carriage/stock.py +++ b/modules/carrier_carriage/stock.py @@ -182,7 +182,7 @@ class _ShipmentOutMixin(_ShipmentMixin): @classmethod @ModelView.button @Workflow.transition('done') - def done(cls, shipments): + def do(cls, shipments): pool = Pool() Carriage = pool.get('stock.shipment.carriage') has_cost_sale = hasattr(Carriage, 'cost_sale') @@ -197,7 +197,7 @@ class _ShipmentOutMixin(_ShipmentMixin): carriage.cost_sale_currency_used) carriages.append(carriage) Carriage.save(carriages) - super().done(shipments) + super().do(shipments) class ShipmentOut(_ShipmentOutMixin, metaclass=PoolMeta): diff --git a/modules/carrier_carriage/tests/scenario_carrier_carriage.rst b/modules/carrier_carriage/tests/scenario_carrier_carriage.rst index d4e19b03c1..04c6b3b96a 100644 --- a/modules/carrier_carriage/tests/scenario_carrier_carriage.rst +++ b/modules/carrier_carriage/tests/scenario_carrier_carriage.rst @@ -143,7 +143,7 @@ Send products:: >>> shipment.click('assign_force') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/carrier_percentage/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst b/modules/carrier_percentage/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst index 496f273419..5caf5dae18 100644 --- a/modules/carrier_percentage/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst +++ b/modules/carrier_percentage/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst @@ -187,7 +187,7 @@ Send products:: >>> shipment.click('pack') >>> shipment.state 'packed' - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/carrier_weight/tests/scenario_carrier_weight.rst b/modules/carrier_weight/tests/scenario_carrier_weight.rst index 13a3080780..6e43e36648 100644 --- a/modules/carrier_weight/tests/scenario_carrier_weight.rst +++ b/modules/carrier_weight/tests/scenario_carrier_weight.rst @@ -204,7 +204,7 @@ Send products:: >>> shipment.click('pack') >>> shipment.state 'packed' - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/commission/tests/scenario_commission_stock.rst b/modules/commission/tests/scenario_commission_stock.rst index c39e43ae48..f082c2a42c 100644 --- a/modules/commission/tests/scenario_commission_stock.rst +++ b/modules/commission/tests/scenario_commission_stock.rst @@ -146,7 +146,7 @@ Ship in two steps:: >>> shipment.click('assign_force') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' @@ -155,7 +155,7 @@ Ship in two steps:: >>> shipment.click('assign_force') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/product_cost_warehouse/tests/scenario_account_stock_continental.rst b/modules/product_cost_warehouse/tests/scenario_account_stock_continental.rst index dbcd232519..ca9e963783 100644 --- a/modules/product_cost_warehouse/tests/scenario_account_stock_continental.rst +++ b/modules/product_cost_warehouse/tests/scenario_account_stock_continental.rst @@ -125,7 +125,7 @@ Transfer 1 product between warehouses:: >>> accounts['stock'].balance Decimal('0.00') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> accounts['stock'].reload() diff --git a/modules/product_cost_warehouse/tests/scenario_product_cost_warehouse.rst b/modules/product_cost_warehouse/tests/scenario_product_cost_warehouse.rst index 16c33e2e6c..71433490c4 100644 --- a/modules/product_cost_warehouse/tests/scenario_product_cost_warehouse.rst +++ b/modules/product_cost_warehouse/tests/scenario_product_cost_warehouse.rst @@ -181,7 +181,7 @@ Transfer 1 product between warehouses:: >>> move.cost_price Decimal('90.0000') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' >>> move, = shipment.incoming_moves diff --git a/modules/product_kit/tests/scenario_product_kit_purchase.rst b/modules/product_kit/tests/scenario_product_kit_purchase.rst index e858afae9d..1d917264d6 100644 --- a/modules/product_kit/tests/scenario_product_kit_purchase.rst +++ b/modules/product_kit/tests/scenario_product_kit_purchase.rst @@ -231,7 +231,7 @@ Receive partial shipment:: ... m.product: m for m in shipment.incoming_moves} >>> product2move[product2].quantity = 2.0 >>> shipment.click('receive') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/product_kit/tests/scenario_product_kit_sale.rst b/modules/product_kit/tests/scenario_product_kit_sale.rst index f20d532713..ebb2809098 100644 --- a/modules/product_kit/tests/scenario_product_kit_sale.rst +++ b/modules/product_kit/tests/scenario_product_kit_sale.rst @@ -215,7 +215,7 @@ Ship partially:: >>> shipment.click('assign_force') >>> shipment.click('pick') >>> shipment.click('pack') - >>> shipment.click('done') + >>> shipment.click('do') >>> shipment.state 'done' diff --git a/modules/production/CHANGELOG b/modules/production/CHANGELOG index fb2a317e68..132e68a703 100644 --- a/modules/production/CHANGELOG +++ b/modules/production/CHANGELOG @@ -1,3 +1,4 @@ +* Rename 'done' button to 'do' * Fill production number only in waiting state Version 7.0.0 - 2023-10-30 diff --git a/modules/production/production.py b/modules/production/production.py index 6bcfb769d2..16d8e48c8f 100644 --- a/modules/production/production.py +++ b/modules/production/production.py @@ -228,7 +228,7 @@ class Production(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): 'invisible': Eval('state') != 'assigned', 'depends': ['state'], }, - 'done': { + 'do': { 'invisible': Eval('state') != 'running', 'depends': ['state'], }, @@ -772,7 +772,7 @@ class Production(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): @ModelView.button @Workflow.transition('done') @set_employee('done_by') - def done(cls, productions): + def do(cls, productions): pool = Pool() Move = pool.get('stock.move') Date = pool.get('ir.date') @@ -873,7 +873,7 @@ class Production_Lot(metaclass=PoolMeta): @classmethod @ModelView.button @Workflow.transition('done') - def done(cls, productions): + def do(cls, productions): pool = Pool() Lot = pool.get('stock.lot') Move = pool.get('stock.move') @@ -888,4 +888,4 @@ class Production_Lot(metaclass=PoolMeta): moves.append(move) Lot.save(lots) Move.save(moves) - super().done(productions) + super().do(productions) diff --git a/modules/production/production.xml b/modules/production/production.xml index 57c5d3e6f9..07530934eb 100644 --- a/modules/production/production.xml +++ b/modules/production/production.xml @@ -242,8 +242,8 @@ this repository contains the full copyright notices and license terms. --> production - done - Done + do + Complete Are you sure you want to complete the production? diff --git a/modules/production/tests/scenario_production.rst b/modules/production/tests/scenario_production.rst index 128fb22464..4bfe0fc984 100644 --- a/modules/production/tests/scenario_production.rst +++ b/modules/production/tests/scenario_production.rst @@ -171,7 +171,7 @@ Do the production:: {'done'} >>> for input_ in production.inputs: ... assertEqual(input_.effective_date, today) - >>> production.click('done') + >>> production.click('do') >>> output, = production.outputs >>> output.state 'done' @@ -197,7 +197,7 @@ Make a production with effective date yesterday and running the day before:: >>> production.reload() >>> for input_ in production.inputs: ... assertEqual(input_.effective_date, before_yesterday) - >>> production.click('done') + >>> production.click('do') >>> production.reload() >>> output, = production.outputs >>> assertEqual(output.effective_date, yesterday) diff --git a/modules/production/tests/scenario_production_by_product.rst b/modules/production/tests/scenario_production_by_product.rst index 53524491ec..343724b7e9 100644 --- a/modules/production/tests/scenario_production_by_product.rst +++ b/modules/production/tests/scenario_production_by_product.rst @@ -91,7 +91,7 @@ Make a production:: >>> production.click('wait') >>> production.click('assign_force') >>> production.click('run') - >>> production.click('done') + >>> production.click('do') Check output price:: diff --git a/modules/production/tests/scenario_production_lot_number.rst b/modules/production/tests/scenario_production_lot_number.rst index 541158dcf2..900820b884 100644 --- a/modules/production/tests/scenario_production_lot_number.rst +++ b/modules/production/tests/scenario_production_lot_number.rst @@ -60,7 +60,7 @@ Make a production:: >>> production.click('wait') >>> production.click('assign_force') >>> production.click('run') - >>> production.click('done') + >>> production.click('do') >>> production.state 'done' diff --git a/modules/production/tests/scenario_production_lot_trace.rst b/modules/production/tests/scenario_production_lot_trace.rst index ba17cac570..22ca78a033 100644 --- a/modules/production/tests/scenario_production_lot_trace.rst +++ b/modules/production/tests/scenario_production_lot_trace.rst @@ -74,7 +74,7 @@ Make a production:: >>> production.click('wait') >>> production.click('assign_force') >>> production.click('run') - >>> production.click('done') + >>> production.click('do') >>> production.state 'done' diff --git a/modules/production/tests/scenario_production_no_list_price.rst b/modules/production/tests/scenario_production_no_list_price.rst index a65b6d7113..d1c6638265 100644 --- a/modules/production/tests/scenario_production_no_list_price.rst +++ b/modules/production/tests/scenario_production_no_list_price.rst @@ -71,7 +71,7 @@ Make a production:: >>> output.quantity = 2 >>> output.save() >>> _ = output.duplicate() - >>> production.click('done') + >>> production.click('do') Check output price:: diff --git a/modules/production/tests/scenario_production_set_cost.rst b/modules/production/tests/scenario_production_set_cost.rst index 2c4d308852..3de046bd89 100644 --- a/modules/production/tests/scenario_production_set_cost.rst +++ b/modules/production/tests/scenario_production_set_cost.rst @@ -74,7 +74,7 @@ Make a production with 2 unused component:: >>> output.currency = company.currency >>> output.from_location = production.location >>> output.to_location = production.warehouse.storage_location - >>> production.click('done') + >>> production.click('do') Check output price:: diff --git a/modules/production/tests/scenario_production_waste.rst b/modules/production/tests/scenario_production_waste.rst index 8e60698c73..9006f95193 100644 --- a/modules/production/tests/scenario_production_waste.rst +++ b/modules/production/tests/scenario_production_waste.rst @@ -81,7 +81,7 @@ Create outputs including waste products:: >>> waste_output.product = product >>> waste_output.from_location = production.location >>> waste_output.to_location = lost_found_loc - >>> production.click('done') + >>> production.click('do') >>> production.cost Decimal('20.0000') >>> output, = [o for o in production.outputs diff --git a/modules/production/view/production_form.xml b/modules/production/view/production_form.xml index 0a607e4e75..904e1dfbd4 100644 --- a/modules/production/view/production_form.xml +++ b/modules/production/view/production_form.xml @@ -56,6 +56,6 @@ this repository contains the full copyright notices and license terms. -->