diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-09-24 15:05:17 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-09-24 15:05:17 +0200 |
| commit | 0c040ae2370d36f560dbcbce794ce3c3bdb72bb2 (patch) | |
| tree | 5261996256bc4fa981f9ac5d2038bce1ef02e7e2 /addons/website_mail | |
| parent | f181f21cf47c314b2cfec58f7c831d3e9a1897ee (diff) | |
| parent | 39726ffe2d8041a0b8b15bcc97b324a96d1fe64f (diff) | |
[MERGE] [IMP] [DEMO] event, website_event improvements
[IMP] [DEMO] event: cleaned demo data. Also renamed note field into description, and moved it out of groups_noone, in order to effectively use it to hold the html description of the event.
[IMP] event_sale: cleaned demo data
[ADD] website_mail: added mail_thread file that hold website_message_ids field, holding published comments. Use it for public objects. However as inheritance seems to be still buggy, this field is redefined in website_blog and website_event (at least) to be able to use it. Remove specific declarations when the bug is fixed.
[IMP] [ADD] website_event:
- added skeleton directory for doc
- added skeleton directory for tests
- added dependency towards website_mail module, to benefit from follow feature
- cleaned demo data
- use website_mail for follow / unfollow mechanism
- added website_message_ids field, use it in view
- some improvements in website view (title, event description)
[FIX] website_sales: somewhat fixed partner information fetch in checkout; whole code of those controllers is really obfuscated and very dubious.
bzr revid: tde@openerp.com-20130924130517-hzi2qm108ec65viq
Diffstat (limited to 'addons/website_mail')
| -rw-r--r-- | addons/website_mail/__init__.py | 1 | ||||
| -rw-r--r-- | addons/website_mail/mail_thread.py | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/addons/website_mail/__init__.py b/addons/website_mail/__init__.py index 4eb031ad44b..e20643cc03d 100644 --- a/addons/website_mail/__init__.py +++ b/addons/website_mail/__init__.py @@ -21,3 +21,4 @@ import controllers import mail_message +import mail_thread diff --git a/addons/website_mail/mail_thread.py b/addons/website_mail/mail_thread.py new file mode 100644 index 00000000000..c88fd032271 --- /dev/null +++ b/addons/website_mail/mail_thread.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from openerp.osv import osv, fields + + +class MailThread(osv.Model): + _inherit = 'mail.thread' + + _columns = { + 'website_message_ids': fields.one2many( + 'mail.message', 'res_id', + domain=lambda self: [ + '&', ('model', '=', self._name), ('type', '=', 'comment') + ], + string='Website Messages', + help="Website communication history", + ), + } |
