Skip to content

Commit

Permalink
[REF] l10n_br_account: adapt to l10n_br_fiscal_edi
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Sep 9, 2024
1 parent d7738a4 commit 4ba569c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
5 changes: 3 additions & 2 deletions l10n_br_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Brazilian Localization Account",
"name": "Invoicing and accounting entries for Brazil",
"summary": "Invoicing and accounting entries for Brazil",
"category": "Localisation",
"license": "AGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"version": "15.0.2.8.0",
"version": "15.0.2.9.0",
"development_status": "Beta",
"maintainers": ["renatonlima", "rvalyi"],
"depends": [
Expand Down
7 changes: 4 additions & 3 deletions l10n_br_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,10 @@ def action_document_back2draft(self):
move.button_draft()

def _post(self, soft=True):
self.mapped("fiscal_document_id").filtered(
lambda d: d.document_type_id
)._document_confirm_to_send()
for move in self.with_context(skip_post=True):
move.fiscal_document_ids.filtered(
lambda d: d.document_type_id
).action_document_confirm()
return super()._post(soft=soft)

def view_xml(self):
Expand Down
5 changes: 3 additions & 2 deletions l10n_br_account/models/fiscal_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def _document_correction(self, justificative):

def action_document_confirm(self):
result = super().action_document_confirm()
move_ids = self.move_ids.filtered(lambda move: move.state == "draft")
move_ids._post()
if not self._context.get("skip_post"):
move_ids = self.move_ids.filtered(lambda move: move.state == "draft")
move_ids._post()
return result
1 change: 0 additions & 1 deletion l10n_br_account/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import account_move_reversal
from . import wizard_document_invalidate
13 changes: 0 additions & 13 deletions l10n_br_account/wizards/wizard_document_invalidate.py

This file was deleted.

0 comments on commit 4ba569c

Please sign in to comment.