summaryrefslogtreecommitdiff
path: root/addons/sale_stock/tests
diff options
context:
space:
mode:
authoroco-odoo <oco@odoo.com>2020-01-16 18:04:26 +0000
committeroco-odoo <oco@odoo.com>2020-01-16 18:04:26 +0000
commit8e4158af810bcf475214946fa64d3b0ce4d3b26d (patch)
treebee0b38b9179a025c0f23d2ed1b445a647bbf986 /addons/sale_stock/tests
parent1a7c21328f551ee0ec904606209d642a84071446 (diff)
[IMP] account: add 'partial' and 'reversed' payment states to invoices
- 'partial' payment state corresponds to invoices whose payable/receivable move line has been partially reconciled with some other line. - 'reversed' payment state corresponds to entries that have been cancelled by the creation of a single reverse entry (using the dedicated button on the form view). This state can be set on invoice as well as on regular entries. => To stay consistent with the naming conventions, this commit also renames invoice_payment_state field to payment_state, since it's no longer only applicable on invoices. closes odoo/odoo#41723 Related: odoo/enterprise#7202 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons/sale_stock/tests')
-rw-r--r--addons/sale_stock/tests/test_anglo_saxon_valuation_reconciliation.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/sale_stock/tests/test_anglo_saxon_valuation_reconciliation.py b/addons/sale_stock/tests/test_anglo_saxon_valuation_reconciliation.py
index 038990def81..a88ec316542 100644
--- a/addons/sale_stock/tests/test_anglo_saxon_valuation_reconciliation.py
+++ b/addons/sale_stock/tests/test_anglo_saxon_valuation_reconciliation.py
@@ -157,10 +157,8 @@ class TestValuationReconciliation(ValuationReconciliationTestCommon):
'refund_method': 'cancel',
})
refund_invoice = self.env['account.move'].browse(refund_invoice_wiz.reverse_moves()['res_id'])
- self.assertTrue(
- invoice.invoice_payment_state == refund_invoice.invoice_payment_state == 'paid',
- "Invoice and refund should both be in 'Paid' state"
- )
+ self.assertEqual(invoice.payment_state, 'reversed', "Invoice should be in 'reversed' state.")
+ self.assertEqual(refund_invoice.payment_state, 'paid', "Refund should be in 'paid' state.")
self.check_reconciliation(refund_invoice, return_pick, operation='sale')
def test_multiple_shipments_invoices(self):