diff --git a/fieldservice_stock_account/tests/test_fsm_stock_account.py b/fieldservice_stock_account/tests/test_fsm_stock_account.py index f3c7205154..4cba2f451d 100644 --- a/fieldservice_stock_account/tests/test_fsm_stock_account.py +++ b/fieldservice_stock_account/tests/test_fsm_stock_account.py @@ -4,6 +4,7 @@ import datetime from odoo.tests.common import TransactionCase +from odoo.exceptions import ValidationError class FSMStockAccountCase(TransactionCase): @@ -76,6 +77,7 @@ def test_fsm_order(self): SR_2.action_confirm() fsm_order2.account_no_invoice() fsm_order2.bill_to = "contact" - fsm_order2.account_no_invoice() + with self.assertRaises(ValidationError): + fsm_order2.account_no_invoice() fsm_order2.customer_id = self.test_partner.id fsm_order2.account_no_invoice()