mreficent
7 years ago
12 changed files with 109 additions and 110 deletions
-
3.gitignore
-
12base_search_mail_content/README.rst
-
7base_search_mail_content/__manifest__.py
-
6base_search_mail_content/data/trgm_index_data.xml
-
3base_search_mail_content/models/__init__.py
-
62base_search_mail_content/models/mail_thread.py
-
13base_search_mail_content/models/res_partner.py
-
BINbase_search_mail_content/static/description/icon.png
-
3base_search_mail_content/tests/__init__.py
-
25base_search_mail_content/tests/test_base_search_mail_content.py
-
6base_search_mail_content/views/trgm_index_view.xml
-
1oca_dependencies.txt
@ -1,8 +1,7 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
# © 2016 Eficent Business and IT Consulting Services S.L. |
|
||||
|
# © 2016-17 Eficent Business and IT Consulting Services S.L. |
||||
# (http://www.eficent.com) |
# (http://www.eficent.com) |
||||
# © 2016 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) |
# © 2016 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) |
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from . import mail_thread |
from . import mail_thread |
||||
from . import res_partner |
|
@ -1,13 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# © 2016 Eficent Business and IT Consulting Services S.L. |
|
||||
# (http://www.eficent.com) |
|
||||
# © 2016 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) |
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
||||
|
|
||||
from openerp import models |
|
||||
|
|
||||
|
|
||||
class Partner(models.Model): |
|
||||
|
|
||||
_name = 'res.partner' |
|
||||
_inherit = ['res.partner', 'mail.thread'] |
|
After Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
from . import test_base_search_mail_content |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
||||
|
# (http://www.eficent.com) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
from odoo.tests.common import TransactionCase |
||||
|
|
||||
|
|
||||
|
class TestBaseSearchMailContent(TransactionCase): |
||||
|
def setUp(self): |
||||
|
super(TestBaseSearchMailContent, self).setUp() |
||||
|
self.channel_obj = self.env["mail.channel"] |
||||
|
|
||||
|
def test_base_search_mail_content_1(self): |
||||
|
res = self.channel_obj.search( |
||||
|
[('message_content', 'ilike', 'xxxyyyzzz')]) |
||||
|
self.assertFalse(res, "You have a channel with xxxyyyzzz :O") |
||||
|
|
||||
|
def test_base_search_mail_content_2(self): |
||||
|
res = self.channel_obj.load_views( |
||||
|
[[False, 'search']], {'load_fields': False, |
||||
|
'load_filters': True, |
||||
|
'toolbar': True}) |
||||
|
self.assertIn( |
||||
|
'message_content', res['fields_views']['search']['fields'], |
||||
|
"message_content field was not detected") |
@ -0,0 +1 @@ |
|||||
|
server-tools |
Write
Preview
Loading…
Cancel
Save
Reference in new issue