diff --git a/mail_message_auto_expand/README.rst b/mail_message_auto_expand/README.rst new file mode 100644 index 00000000..1b23769f --- /dev/null +++ b/mail_message_auto_expand/README.rst @@ -0,0 +1,55 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================== +Mail Message Auto Expand +======================== + +This module extends the functionality of mail. It automatically expands the +messages in the chatter. Instead of having to click *read more* + +Usage +===== + +Just install + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smash it by providing a detailed and +welcomed feedback `here `_. + + +Credits +======= + +Images +------ + +* PICOL Icon Generator `here `_. + +Contributors +------------ + +* Dan Kiplangat +* Tom Blauwendraat + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/mail_message_auto_expand/__init__.py b/mail_message_auto_expand/__init__.py index be592a82..94469cde 100644 --- a/mail_message_auto_expand/__init__.py +++ b/mail_message_auto_expand/__init__.py @@ -1,3 +1,5 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- +# © 2016 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import mail \ No newline at end of file +from . import models diff --git a/mail_message_auto_expand/__openerp__.py b/mail_message_auto_expand/__openerp__.py index 900410bb..3a81db44 100644 --- a/mail_message_auto_expand/__openerp__.py +++ b/mail_message_auto_expand/__openerp__.py @@ -1,13 +1,22 @@ -{ - 'name': 'Mail Message Auto Expand', - 'version': '8.0', - 'summary': 'Expands the Read More Automatically', - 'description': '', - 'author': 'Sunflower IT', - 'website': 'http://www.sunflowerweb.nl', - 'category': 'Social Network', - 'images': [], - 'depends': ['mail'], - 'data': [], - 'installable': True, +# -*- coding: utf-8 -*- +# © 2016 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Mail Message Auto Expand", + "summary": "Expands the Read More Automatically", + "version": "8.0.1.0.0", + "category": "Social Network", + "website": "https://sunflowerweb.nl", + "author": "Sunflower IT, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "mail", + ], + "data": [], + "qweb": [ + "static/src/xml/mail_autoexpand.xml", + ], } diff --git a/mail_message_auto_expand/mail.py b/mail_message_auto_expand/mail.py deleted file mode 100644 index 76237ef8..00000000 --- a/mail_message_auto_expand/mail.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2017 Sunflower IT (http://sunflowerweb.nl) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import logging -from openerp import _, api, models, tools -from openerp.tools import html_email_clean -from openerp.tools.translate import _ -from HTMLParser import HTMLParser -from openerp import SUPERUSER_ID, api -_logger = logging.getLogger(__name__) - - -class MailMessage(models.Model): - _inherit = 'mail.message' - - def _message_read_dict(self, cr, uid, message, parent_id=False, - context=None): - max_length = 10000 # Increase the max lenght - body_short = html_email_clean(message.body, remove=False, shorten=False, - max_length=max_length) # Disable shortening - ret = super(MailMessage, self)._message_read_dict(cr, uid, - message, - parent_id=parent_id, - context=context) - ret['body_short'] = body_short - return ret - - diff --git a/mail_message_auto_expand/static/description/icon.png b/mail_message_auto_expand/static/description/icon.png index bc9b9414..1b97f39d 100644 Binary files a/mail_message_auto_expand/static/description/icon.png and b/mail_message_auto_expand/static/description/icon.png differ diff --git a/mail_message_auto_expand/static/src/xml/mail_autoexpand.xml b/mail_message_auto_expand/static/src/xml/mail_autoexpand.xml new file mode 100644 index 00000000..5648fc85 --- /dev/null +++ b/mail_message_auto_expand/static/src/xml/mail_autoexpand.xml @@ -0,0 +1,9 @@ + + +