Skip to content

Commit

Permalink
Merge PR #3032 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by mileo
  • Loading branch information
OCA-git-bot committed Apr 24, 2024
2 parents 6fff1d3 + bc7a012 commit 7d63de3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions l10n_br_account/models/fiscal_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,13 @@ def create(self, vals_list):
return super().create(filtered_vals_list)
else:
return super().create(vals_list)

@api.returns("mail.message", lambda value: value.id)
def message_post(self, **kwargs):
"""
broadcast message_post to all related account.move so
messages in a fiscal document chatter are visible in the
related account moves.
"""
for doc in self:
doc.move_ids.message_post(**kwargs)
1 change: 1 addition & 0 deletions l10n_br_fiscal/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Document(models.Model):
"l10n_br_fiscal.document.mixin.fields",
"l10n_br_fiscal.document.electronic",
"l10n_br_fiscal.document.move.mixin",
"mail.thread",
]
_description = "Fiscal Document"
_check_company_auto = True
Expand Down

0 comments on commit 7d63de3

Please sign in to comment.