[FIX] sale_stock: Adapt test due to c854de4
The tested use case is the following:
- Create a SO with 5 units of a product (invoiced on delivered quantity)
- Ship 5 units
- Create an invoice with 5 units, validate
- Return 2 units from delivery
The current state:
- Ordered : 5
- Delivered : 3
- Invoiced : 5
In that case you have invoiced more than the delivered quantity and the sales order should be marked as fully invoiced following the commit c854de4
The salesman will transfer the credit note to the accountant and everybody's happy.
As it is the intended behavior, this commit modifies the test.
This commit is contained in:
@@ -172,7 +172,7 @@ class TestSaleStock(TestSale):
|
||||
return_pick.do_new_transfer()
|
||||
|
||||
# Check invoice
|
||||
self.assertEqual(self.so.invoice_status, 'to invoice', 'Sale Stock: so invoice_status should be "to invoice" instead of "%s" after picking return' % self.so.invoice_status)
|
||||
self.assertEqual(self.so.invoice_status, 'invoiced', 'Sale Stock: so invoice_status should be "to invoice" instead of "%s" after picking return' % self.so.invoice_status)
|
||||
self.assertEqual(self.so.order_line[0].qty_delivered, 3.0, 'Sale Stock: delivered quantity should be 3.0 instead of "%s" after picking return' % self.so.order_line[0].qty_delivered)
|
||||
# let's do an invoice with refunds
|
||||
adv_wiz = self.env['sale.advance.payment.inv'].with_context(active_ids=[self.so.id]).create({
|
||||
|
||||
Reference in New Issue
Block a user