prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [13.0] [BUG]"base_search_mail_content" module > Getting bug with "hr" (Employees) module
  module: base_search_mail_content
  version: 13.0
  
  **Context :**
  OCB 13.0 Odoo Server up to date [(08/30/2020),]
  Virgin database , to reproduce issue faced on my test environnement.
  Also !! >> Get same bug on runbot : http://3437172-13-0-56e0a2.runbot2-2.odoo-community.org
  
  **Steps to reproduce**
  - Install together  "base_search_mail_content" & "hr" (Employees) native odoo module, and try to access to : hr" (Employees)
  
  **Current behavior**  (model=hr.employee&view_type=kanban, or tree)
  When i try to access to menu "Employees"There is this following message : 
  > Something went wrong !
  Only types ['many2one'] are supported for category (found type text)
  
  **Current resolution**
  i uninstall "base_search_mail_content" to retreive access to hr" (Employees)
  
  -----------------------------------------------------------------------------------------------------------------------
  ![Capture-Access _employees-1](https://user-images.githubusercontent.com/59052920/91721693-74c7db80-eb99-11ea-8871-c5a5b0b21eac.JPG)
  ![Capture-Access _employees](https://user-images.githubusercontent.com/59052920/91721766-932dd700-eb99-11ea-8c2b-12a280df4217.JPG)
  
  
  
  </issue>
  <code>
  [start of base_search_mail_content/models/mail_thread.py]
  1 # Copyright 2016-17 Eficent Business and IT Consulting Services S.L.
  2 #   (http://www.eficent.com)
  3 # Copyright 2016 Serpent Consulting Services Pvt. Ltd.
  4 #   (<http://www.serpentcs.com>)
  5 # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  6 
  7 from lxml import etree
  8 
  9 from odoo import _, api, fields, models
  10 from odoo.osv import expression
  11 
  12 
  13 class MailThread(models.AbstractModel):
  14     _inherit = "mail.thread"
  15 
  16     def _search_message_content(self, operator, value):
  17         model_domain = [("model", "=", self._name)]
  18         if operator not in expression.NEGATIVE_TERM_OPERATORS:
  19             model_domain += ["|"] * 4
  20         model_domain += [
  21             ("record_name", operator, value),
  22             ("subject", operator, value),
  23             ("body", operator, value),
  24             ("email_from", operator, value),
  25             ("reply_to", operator, value),
  26         ]
  27         recs = self.env["mail.message"].search(model_domain)
  28         return [("id", "in", recs.mapped("res_id"))]
  29 
  30     message_content = fields.Text(
  31         string="Message Content",
  32         help="Message content, to be used only in searches",
  33         compute=lambda self: False,
  34         search="_search_message_content",
  35     )
  36 
  37     @api.model
  38     def fields_view_get(
  39         self, view_id=None, view_type="form", toolbar=False, submenu=False
  40     ):
  41         """
  42         Override to add message_content field in all the objects
  43         that inherits mail.thread
  44         """
  45         res = super(MailThread, self).fields_view_get(
  46             view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu
  47         )
  48         if view_type == "search" and self._fields.get("message_content"):
  49             doc = etree.XML(res["arch"])
  50             res["fields"].update(
  51                 {"message_content": {"type": "char", "string": _("Message Content")}}
  52             )
  53 
  54             for node in doc.xpath("//field[last()]"):
  55                 # Add message_content in search view
  56                 elem = etree.Element("field", {"name": "message_content"})
  57                 node.addnext(elem)
  58                 res["arch"] = etree.tostring(doc)
  59         return res
  60
  [end of base_search_mail_content/models/mail_thread.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/base_search_mail_content/models/mail_thread.py b/base_search_mail_content/models/mail_thread.py
  --- a/base_search_mail_content/models/mail_thread.py
  +++ b/base_search_mail_content/models/mail_thread.py
  @@ -50,8 +50,7 @@
               res["fields"].update(
                   {"message_content": {"type": "char", "string": _("Message Content")}}
               )
  -
  -            for node in doc.xpath("//field[last()]"):
  +            for node in doc.xpath("/search/field[last()]"):
                   # Add message_content in search view
                   elem = etree.Element("field", {"name": "message_content"})
                   node.addnext(elem)
  
verification_info: {"golden_diff": "diff --git a/base_search_mail_content/models/mail_thread.py b/base_search_mail_content/models/mail_thread.py\n--- a/base_search_mail_content/models/mail_thread.py\n+++ b/base_search_mail_content/models/mail_thread.py\n@@ -50,8 +50,7 @@\n             res[\"fields\"].update(\n                 {\"message_content\": {\"type\": \"char\", \"string\": _(\"Message Content\")}}\n             )\n-\n-            for node in doc.xpath(\"//field[last()]\"):\n+            for node in doc.xpath(\"/search/field[last()]\"):\n                 # Add message_content in search view\n                 elem = etree.Element(\"field\", {\"name\": \"message_content\"})\n                 node.addnext(elem)\n", "issue": "[13.0] [BUG]\"base_search_mail_content\" module > Getting bug with \"hr\" (Employees) module\nmodule: base_search_mail_content\r\nversion: 13.0\r\n\r\n**Context :**\r\nOCB 13.0 Odoo Server up to date [(08/30/2020),]\r\nVirgin database , to reproduce issue faced on my test environnement.\r\nAlso !! >> Get same bug on runbot : http://3437172-13-0-56e0a2.runbot2-2.odoo-community.org\r\n\r\n**Steps to reproduce**\r\n- Install together  \"base_search_mail_content\" & \"hr\" (Employees) native odoo module, and try to access to : hr\" (Employees)\r\n\r\n**Current behavior**  (model=hr.employee&view_type=kanban, or tree)\r\nWhen i try to access to menu \"Employees\"There is this following message : \r\n> Something went wrong !\r\nOnly types ['many2one'] are supported for category (found type text)\r\n\r\n**Current resolution**\r\ni uninstall \"base_search_mail_content\" to retreive access to hr\" (Employees)\r\n\r\n-----------------------------------------------------------------------------------------------------------------------\r\n![Capture-Access _employees-1](https://user-images.githubusercontent.com/59052920/91721693-74c7db80-eb99-11ea-8871-c5a5b0b21eac.JPG)\r\n![Capture-Access _employees](https://user-images.githubusercontent.com/59052920/91721766-932dd700-eb99-11ea-8c2b-12a280df4217.JPG)\r\n\r\n\n", "before_files": [{"content": "# Copyright 2016-17 Eficent Business and IT Consulting Services S.L.\n#   (http://www.eficent.com)\n# Copyright 2016 Serpent Consulting Services Pvt. Ltd.\n#   (<http://www.serpentcs.com>)\n# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).\n\nfrom lxml import etree\n\nfrom odoo import _, api, fields, models\nfrom odoo.osv import expression\n\n\nclass MailThread(models.AbstractModel):\n    _inherit = \"mail.thread\"\n\n    def _search_message_content(self, operator, value):\n        model_domain = [(\"model\", \"=\", self._name)]\n        if operator not in expression.NEGATIVE_TERM_OPERATORS:\n            model_domain += [\"|\"] * 4\n        model_domain += [\n            (\"record_name\", operator, value),\n            (\"subject\", operator, value),\n            (\"body\", operator, value),\n            (\"email_from\", operator, value),\n            (\"reply_to\", operator, value),\n        ]\n        recs = self.env[\"mail.message\"].search(model_domain)\n        return [(\"id\", \"in\", recs.mapped(\"res_id\"))]\n\n    message_content = fields.Text(\n        string=\"Message Content\",\n        help=\"Message content, to be used only in searches\",\n        compute=lambda self: False,\n        search=\"_search_message_content\",\n    )\n\n    @api.model\n    def fields_view_get(\n        self, view_id=None, view_type=\"form\", toolbar=False, submenu=False\n    ):\n        \"\"\"\n        Override to add message_content field in all the objects\n        that inherits mail.thread\n        \"\"\"\n        res = super(MailThread, self).fields_view_get(\n            view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu\n        )\n        if view_type == \"search\" and self._fields.get(\"message_content\"):\n            doc = etree.XML(res[\"arch\"])\n            res[\"fields\"].update(\n                {\"message_content\": {\"type\": \"char\", \"string\": _(\"Message Content\")}}\n            )\n\n            for node in doc.xpath(\"//field[last()]\"):\n                # Add message_content in search view\n                elem = etree.Element(\"field\", {\"name\": \"message_content\"})\n                node.addnext(elem)\n                res[\"arch\"] = etree.tostring(doc)\n        return res\n", "path": "base_search_mail_content/models/mail_thread.py"}]}