diff --git a/modules/product_kit/tests/scenario_product_kit_purchase.rst b/modules/product_kit/tests/scenario_product_kit_purchase.rst index 1d917264d6..69f3036088 100644 --- a/modules/product_kit/tests/scenario_product_kit_purchase.rst +++ b/modules/product_kit/tests/scenario_product_kit_purchase.rst @@ -281,6 +281,8 @@ Cancel backorder:: Handle shipment exception:: >>> shipment_exception = purchase.click('handle_shipment_exception') + >>> shipment_exception.form.recreate_moves.extend( + ... shipment_exception.form.recreate_moves.find()) >>> shipment_exception.execute('handle') >>> len(purchase.moves) diff --git a/modules/product_kit/tests/scenario_product_kit_sale.rst b/modules/product_kit/tests/scenario_product_kit_sale.rst index ebb2809098..840c7c3172 100644 --- a/modules/product_kit/tests/scenario_product_kit_sale.rst +++ b/modules/product_kit/tests/scenario_product_kit_sale.rst @@ -270,10 +270,12 @@ Cancel backorder:: Handle shipment exception:: >>> shipment_exception = sale.click('handle_shipment_exception') - >>> move, = [ - ... m for m in shipment_exception.form.recreate_moves - ... if m.product == product1] - >>> shipment_exception.form.recreate_moves.remove(move) + >>> shipment_exception.form.recreate_moves.extend( + ... shipment_exception.form.recreate_moves.find( + ... [('product', '!=', product1.id)])) + >>> shipment_exception.form.ignore_moves.extend( + ... shipment_exception.form.ignore_moves.find( + ... [('product', '=', product1.id)])) >>> shipment_exception.execute('handle') >>> _, _, shipment = sale.shipments diff --git a/modules/sale_advance_payment/tests/scenario_advance_payment.rst b/modules/sale_advance_payment/tests/scenario_advance_payment.rst index d6bdacf18e..ba1b8f9888 100644 --- a/modules/sale_advance_payment/tests/scenario_advance_payment.rst +++ b/modules/sale_advance_payment/tests/scenario_advance_payment.rst @@ -358,7 +358,8 @@ Handle the exception on the sale level, not recreating the invoice will create the final invoice with the remaining total:: >>> handle_exception = sale.click('handle_invoice_exception') - >>> _ = handle_exception.form.recreate_invoices.pop() + >>> handle_exception.form.ignore_invoices.extend( + ... handle_exception.form.ignore_invoices.find()) >>> handle_exception.execute('handle') >>> sale.reload() @@ -391,6 +392,8 @@ it:: 'exception' >>> handle_exception = sale.click('handle_invoice_exception') + >>> handle_exception.form.recreate_invoices.extend( + ... handle_exception.form.recreate_invoices.find()) >>> handle_exception.execute('handle') >>> sale.reload() >>> _, inv_recreated = sale.advance_payment_invoices diff --git a/modules/sale_shipment_tolerance/tests/scenario_sale_over_shipment_tolerance.rst b/modules/sale_shipment_tolerance/tests/scenario_sale_over_shipment_tolerance.rst index 1fe31b10aa..05d62eba10 100644 --- a/modules/sale_shipment_tolerance/tests/scenario_sale_over_shipment_tolerance.rst +++ b/modules/sale_shipment_tolerance/tests/scenario_sale_over_shipment_tolerance.rst @@ -95,6 +95,8 @@ Cancel shipment and recreate:: 'cancelled' >>> handle_shipment_exception = Wizard('sale.handle.shipment.exception', [sale]) + >>> handle_shipment_exception.form.recreate_moves.extend( + ... handle_shipment_exception.form.recreate_moves.find()) >>> handle_shipment_exception.execute('handle') Over ship 12 products:: diff --git a/modules/sale_supply_drop_shipment/tests/scenario_sale_supply_drop_shipment.rst b/modules/sale_supply_drop_shipment/tests/scenario_sale_supply_drop_shipment.rst index bbb3ff4d3b..080fc2e9af 100644 --- a/modules/sale_supply_drop_shipment/tests/scenario_sale_supply_drop_shipment.rst +++ b/modules/sale_supply_drop_shipment/tests/scenario_sale_supply_drop_shipment.rst @@ -252,7 +252,8 @@ As a consequence the sale order is now in exception:: >>> purchase.shipment_state 'exception' >>> handle_exception = purchase.click('handle_shipment_exception') - >>> _ = handle_exception.form.recreate_moves.pop() + >>> handle_exception.form.ignore_moves.extend( + ... handle_exception.form.ignore_moves.find()) >>> handle_exception.execute('handle') >>> purchase.reload() >>> purchase.shipment_state @@ -350,6 +351,8 @@ The sale is then in exception:: >>> sale.shipment_state 'exception' >>> handle_exception = sale.click('handle_shipment_exception') + >>> handle_exception.form.recreate_moves.extend( + ... handle_exception.form.recreate_moves.find()) >>> handle_exception.execute('handle') >>> sale.reload() >>> sale.shipment_state diff --git a/modules/web_shop_shopify/tests/scenario_web_shop_shopify.rst b/modules/web_shop_shopify/tests/scenario_web_shop_shopify.rst index 3b08e83a97..fa779fa8d1 100644 --- a/modules/web_shop_shopify/tests/scenario_web_shop_shopify.rst +++ b/modules/web_shop_shopify/tests/scenario_web_shop_shopify.rst @@ -582,7 +582,8 @@ Cancel remaining shipment:: Ignore shipment exception:: >>> shipment_exception = sale.click('handle_shipment_exception') - >>> move = shipment_exception.form.recreate_moves.pop() + >>> shipment_exception.form.ignore_moves.extend( + ... shipment_exception.form.ignore_moves.find()) >>> shipment_exception.execute('handle') >>> order.reload()