Skip to content

Commit c2ef850

Browse files
author
GuillermoNforgeflow
committed
[ADD]mail_sent_history: view and browse messages and notes you have sent
1 parent f752a76 commit c2ef850

File tree

17 files changed

+705
-0
lines changed

17 files changed

+705
-0
lines changed

mail_sent_history/README.rst

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
=================
6+
Mail Sent History
7+
=================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:1e357a3b8146be1310054c9611a3265cb612eff883206fe2c4d0d81ff504c142
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github
24+
:target: https://github.com/OCA/mail/tree/17.0/mail_sent_history
25+
:alt: OCA/mail
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/mail-17-0/mail-17-0-mail_sent_history
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=17.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module introduces a “Sent History” mailbox in Odoo's messaging
36+
system, giving users a dedicated view of all messages and notes they
37+
have personally sent. Users can also search through their sent messages
38+
using the search bar.
39+
40+
**Table of contents**
41+
42+
.. contents::
43+
:local:
44+
45+
Usage
46+
=====
47+
48+
1. Open the Discuss (Mail) app from the main Odoo menu.
49+
2. Click on the “Sent History” mailbox in the left-hand sidebar.
50+
3. Browse all messages and notes that you have personally sent.
51+
52+
Bug Tracker
53+
===========
54+
55+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/mail/issues>`_.
56+
In case of trouble, please check there if your issue has already been reported.
57+
If you spotted it first, help us to smash it by providing a detailed and welcomed
58+
`feedback <https://github.com/OCA/mail/issues/new?body=module:%20mail_sent_history%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
59+
60+
Do not contact contributors directly about support or help with technical issues.
61+
62+
Credits
63+
=======
64+
65+
Authors
66+
-------
67+
68+
* ForgeFlow
69+
70+
Contributors
71+
------------
72+
73+
- `ForgeFlow <https://www.forgeflow.com>`__:
74+
75+
- Guillermo Navas <guillermo.navas@forgeflow.com>
76+
77+
Maintainers
78+
-----------
79+
80+
This module is maintained by the OCA.
81+
82+
.. image:: https://odoo-community.org/logo.png
83+
:alt: Odoo Community Association
84+
:target: https://odoo-community.org
85+
86+
OCA, or the Odoo Community Association, is a nonprofit organization whose
87+
mission is to support the collaborative development of Odoo features and
88+
promote its widespread use.
89+
90+
This module is part of the `OCA/mail <https://github.com/OCA/mail/tree/17.0/mail_sent_history>`_ project on GitHub.
91+
92+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

mail_sent_history/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from . import controllers

mail_sent_history/__manifest__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2026 ForgeFlow S.L. (https://www.forgeflow.com)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
{
4+
"name": "Mail Sent History",
5+
"summary": "View and browse messages and notes you have sent",
6+
"version": "17.0.1.0.0",
7+
"category": "Social Network",
8+
"website": "https://github.com/OCA/mail",
9+
"author": "ForgeFlow, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"installable": True,
12+
"depends": ["mail"],
13+
"assets": {
14+
"web.assets_backend": [
15+
"mail_sent_history/static/src/js/*",
16+
"mail_sent_history/static/src/xml/*",
17+
],
18+
},
19+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+
from . import mailbox
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+
from odoo import http
4+
from odoo.http import request
5+
6+
7+
class MailboxControllerExtended(http.Controller):
8+
@http.route(
9+
"/mail/sent_history/messages", methods=["POST"], type="json", auth="user"
10+
)
11+
def discuss_sent_history_messages(
12+
self, search_term=None, before=None, after=None, limit=30, around=None
13+
):
14+
partner_id = request.env.user.partner_id.id
15+
domain = [("author_id", "=", partner_id), ("message_type", "in", ["comment"])]
16+
res = request.env["mail.message"]._message_fetch(
17+
domain,
18+
search_term=search_term,
19+
before=before,
20+
after=after,
21+
around=around,
22+
limit=limit,
23+
)
24+
return {**res, "messages": res["messages"].message_format()}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import mail_message
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from odoo import api, models
2+
3+
4+
class MailMessage(models.Model):
5+
_inherit = "mail.message"
6+
7+
@api.model
8+
def get_sent_history(self):
9+
partner = self.env.user.partner_id
10+
11+
messages = self.search(
12+
[
13+
("author_id", "=", partner.id),
14+
("message_type", "in", ["comment"]),
15+
],
16+
order="date desc",
17+
)
18+
19+
return messages.message_format()

mail_sent_history/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [ForgeFlow](https://www.forgeflow.com):
2+
- Guillermo Navas \<<guillermo.navas@forgeflow.com>\>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This module introduces a “Sent History” mailbox in Odoo's messaging
2+
system, giving users a dedicated view of all messages and notes
3+
they have personally sent. Users can also search through their sent
4+
messages using the search bar.

0 commit comments

Comments
 (0)