Update test scenario to use two Many2Many for handling exceptions
#8142
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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::
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user