Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX][l10n_br_account]: account move on fiscal wiz #3097

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions l10n_br_account/models/fiscal_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,21 @@
"""
for doc in self:
doc.move_ids.message_post(**kwargs)

def cancel_move_ids(self):
for record in self:
if record.move_ids:
self.move_ids.button_cancel()

Check warning on line 167 in l10n_br_account/models/fiscal_document.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_account/models/fiscal_document.py#L167

Added line #L167 was not covered by tests

def _document_cancel(self, justificative):
result = super()._document_cancel(justificative)
msg = "Cancelamento: {}".format(justificative)
self.cancel_move_ids()
self.message_post(body=msg)
return result

Check warning on line 174 in l10n_br_account/models/fiscal_document.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_account/models/fiscal_document.py#L170-L174

Added lines #L170 - L174 were not covered by tests

def _document_correction(self, justificative):
result = super()._document_correction(justificative)
msg = "Carta de correção: {}".format(justificative)
self.message_post(body=msg)
return result

Check warning on line 180 in l10n_br_account/models/fiscal_document.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_account/models/fiscal_document.py#L177-L180

Added lines #L177 - L180 were not covered by tests
4 changes: 0 additions & 4 deletions l10n_br_account/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import base_wizard_mixin

from . import account_move_reversal
from . import wizard_document_cancel
from . import wizard_document_correction
from . import wizard_document_invalidate
26 changes: 0 additions & 26 deletions l10n_br_account/wizards/base_wizard_mixin.py

This file was deleted.

17 changes: 0 additions & 17 deletions l10n_br_account/wizards/wizard_document_cancel.py

This file was deleted.

16 changes: 0 additions & 16 deletions l10n_br_account/wizards/wizard_document_correction.py

This file was deleted.

3 changes: 1 addition & 2 deletions l10n_br_account/wizards/wizard_document_invalidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@

def do_invalidate(self):
result = super().do_invalidate()
if self.move_id:
self.move_id.button_cancel()
self.document_id.cancel_move_ids()

Check warning on line 12 in l10n_br_account/wizards/wizard_document_invalidate.py

View check run for this annotation

Codecov / codecov/patch

l10n_br_account/wizards/wizard_document_invalidate.py#L12

Added line #L12 was not covered by tests
return result
Loading