Skip to content

Commit

Permalink
[FIX] l10n_br_account: state tests when no EDI
Browse files Browse the repository at this point in the history
since OCA#3012
when l10n_br_fiscal_edi is not installed, these tests were failing
  • Loading branch information
rvalyi committed Nov 29, 2024
1 parent 6484c8c commit 5d2925f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions l10n_br_account/tests/test_account_move_lc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1716,16 +1716,20 @@ def test_change_states(self):
self.assertEqual(document_id.state, "em_digitacao")
self.move_out_venda.action_post()
self.assertEqual(self.move_out_venda.state, "posted")
self.assertEqual(document_id.state, "a_enviar")
self.move_out_venda.button_draft()
self.assertEqual(self.move_out_venda.state, "draft")
self.assertEqual(document_id.state, "em_digitacao")
document_id.action_document_confirm()
self.assertEqual(self.move_out_venda.state, "posted")
self.assertEqual(document_id.state, "a_enviar")
document_id.action_document_back2draft()
self.assertEqual(self.move_out_venda.state, "draft")
self.assertEqual(document_id.state, "em_digitacao")
fiscal_edi = self.env["ir.module.module"].search(
[("name", "=", "l10n_br_fiscal_edi")]
)
if fiscal_edi and fiscal_edi.state == "installed":
self.assertEqual(document_id.state, "a_enviar")
self.move_out_venda.button_draft()
self.assertEqual(self.move_out_venda.state, "draft")
self.assertEqual(document_id.state, "em_digitacao")
document_id.action_document_confirm()
self.assertEqual(self.move_out_venda.state, "posted")
self.assertEqual(document_id.state, "a_enviar")
document_id.action_document_back2draft()
self.assertEqual(self.move_out_venda.state, "draft")
self.assertEqual(document_id.state, "em_digitacao")

def test_document_deny(self):
document_id = self.move_out_venda.fiscal_document_id
Expand Down

0 comments on commit 5d2925f

Please sign in to comment.