prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  tree_view_record_id: causes a warning in the logs
  in the runbot logs I get:
  
  2015-07-17 13:09:05,793 27838 WARNING 3110977-7-0-458127-all openerp.modules.loading: The model module.tree.view.record.id.installed has no access rules, consider adding one. E.g. access_module_tree_view_record_id_installed,access_module_tree_view_record_id_installed,model_module_tree_view_record_id_installed,,1,1,1,1
  
  I tracked down module.tree.view.record.id.installed to tree_view_record_id
  
  I totally don't understand why the pseudo dynamic a weird name generated that way, but an ACL is missing
  
  
  </issue>
  <code>
  [start of sentry_logger/__init__.py]
  1 # -*- coding: utf-8 -*-
  2 ###############################################################################
  3 #
  4 #    OpenERP, Open Source Management Solution
  5 #    This module copyright (C) 2010 - 2014 Savoir-faire Linux
  6 #    (<http://www.savoirfairelinux.com>).
  7 #
  8 #    This program is free software: you can redistribute it and/or modify
  9 #    it under the terms of the GNU Affero General Public License as
  10 #    published by the Free Software Foundation, either version 3 of the
  11 #    License, or (at your option) any later version.
  12 #
  13 #    This program is distributed in the hope that it will be useful,
  14 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16 #    GNU Affero General Public License for more details.
  17 #
  18 #    You should have received a copy of the GNU Affero General Public License
  19 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  20 #
  21 ###############################################################################
  22 
  23 import logging
  24 import cgitb
  25 
  26 from openerp.tools import config
  27 from openerp.addons.web.controllers.main import Session
  28 
  29 _DEFAULT_LOGGING_LEVEL = logging.ERROR
  30 
  31 try:
  32     from .odoo_sentry_client import OdooClient
  33     from .odoo_sentry_handler import OdooSentryHandler
  34 
  35     root_logger = logging.root
  36 
  37     processors = (
  38         'raven.processors.SanitizePasswordsProcessor',
  39         'raven_sanitize_openerp.OpenerpPasswordsProcessor'
  40     )
  41     if config.get(u'sentry_dsn'):
  42         cgitb.enable()
  43         # Get DSN info from config file or ~/.openerp_serverrc (recommended)
  44         dsn = config.get('sentry_dsn')
  45         try:
  46             level = getattr(logging, config.get('sentry_logging_level'))
  47         except (AttributeError, TypeError):
  48             level = _DEFAULT_LOGGING_LEVEL
  49         # Create Client
  50         client = OdooClient(
  51             dsn=dsn,
  52             processors=processors,
  53         )
  54         handler = OdooSentryHandler(client, level=level)
  55         root_logger.addHandler(handler)
  56     else:
  57         root_logger.warn(u"Sentry DSN not defined in config file")
  58         client = None
  59 
  60     # Inject sentry_activated to session to display error message or not
  61     old_session_info = Session.session_info
  62 
  63     def session_info(self, req):
  64         res = old_session_info(self, req)
  65         res['sentry_activated'] = bool(client)
  66         return res
  67 
  68     Session.session_info = session_info
  69 except ImportError:
  70     pass
  71
  [end of sentry_logger/__init__.py]
  [start of tree_view_record_id/__openerp__.py]
  1 # -*- coding: utf-8 -*-
  2 ###############################################################################
  3 #
  4 #   Copyright (C) 2012-TODAY Akretion <http://www.akretion.com>.
  5 #     All Rights Reserved
  6 #     @author David BEAL <david.beal@akretion.com>
  7 #   This program is free software: you can redistribute it and/or modify
  8 #   it under the terms of the GNU Affero General Public License as
  9 #   published by the Free Software Foundation, either version 3 of the
  10 #   License, or (at your option) any later version.
  11 #
  12 #   This program is distributed in the hope that it will be useful,
  13 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 #   GNU Affero General Public License for more details.
  16 #
  17 #   You should have received a copy of the GNU Affero General Public License
  18 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19 #
  20 ###############################################################################
  21 
  22 {
  23     'name': 'Tree View Record Id',
  24     'version': '0.1',
  25     'category': 'Other modules',
  26     'sequence': 10,
  27     'author': "Akretion,Odoo Community Association (OCA)",
  28     'summary': "Adds id field to tree views",
  29     'description': """
  30 Adds Id field in all tree views of any modules/models, except:
  31 
  32 * Arborescent tree views like 'Products by Category', 'Chart of accounts', etc.
  33 * Tree views (like in wizard 'Change password') built on transient models
  34   which don't have this column in their table.
  35 
  36 Id field is the primary key of standard sql tables
  37 defined by the orm (Odoo model).
  38     """,
  39     'website': 'http://www.akretion.com',
  40     'depends': [
  41         'base',
  42     ],
  43     'data': [
  44     ],
  45     'demo': [
  46     ],
  47     'installable': True,
  48     'auto_install': False,
  49     'application': False,
  50     'images': [
  51     ],
  52     'css': [
  53     ],
  54     'js': [
  55     ],
  56     'qweb': [
  57     ],
  58 }
  59
  [end of tree_view_record_id/__openerp__.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/sentry_logger/__init__.py b/sentry_logger/__init__.py
  --- a/sentry_logger/__init__.py
  +++ b/sentry_logger/__init__.py
  @@ -20,6 +20,7 @@
   #
   ###############################################################################
   
  +import os
   import logging
   import cgitb
   
  @@ -54,7 +55,12 @@
           handler = OdooSentryHandler(client, level=level)
           root_logger.addHandler(handler)
       else:
  -        root_logger.warn(u"Sentry DSN not defined in config file")
  +        msg = u"Sentry DSN not defined in config file"
  +        if os.environ.get('OCA_CI'):
  +            # don't fail the build on runbot for this
  +            root_logger.info(msg)
  +        else:
  +            root_logger.warn(msg)
           client = None
   
       # Inject sentry_activated to session to display error message or not
  diff --git a/tree_view_record_id/__openerp__.py b/tree_view_record_id/__openerp__.py
  --- a/tree_view_record_id/__openerp__.py
  +++ b/tree_view_record_id/__openerp__.py
  @@ -41,6 +41,7 @@
           'base',
       ],
       'data': [
  +        'security/ir.model.access.csv',
       ],
       'demo': [
       ],
  
verification_info: {"golden_diff": "diff --git a/sentry_logger/__init__.py b/sentry_logger/__init__.py\n--- a/sentry_logger/__init__.py\n+++ b/sentry_logger/__init__.py\n@@ -20,6 +20,7 @@\n #\n ###############################################################################\n \n+import os\n import logging\n import cgitb\n \n@@ -54,7 +55,12 @@\n         handler = OdooSentryHandler(client, level=level)\n         root_logger.addHandler(handler)\n     else:\n-        root_logger.warn(u\"Sentry DSN not defined in config file\")\n+        msg = u\"Sentry DSN not defined in config file\"\n+        if os.environ.get('OCA_CI'):\n+            # don't fail the build on runbot for this\n+            root_logger.info(msg)\n+        else:\n+            root_logger.warn(msg)\n         client = None\n \n     # Inject sentry_activated to session to display error message or not\ndiff --git a/tree_view_record_id/__openerp__.py b/tree_view_record_id/__openerp__.py\n--- a/tree_view_record_id/__openerp__.py\n+++ b/tree_view_record_id/__openerp__.py\n@@ -41,6 +41,7 @@\n         'base',\n     ],\n     'data': [\n+        'security/ir.model.access.csv',\n     ],\n     'demo': [\n     ],\n", "issue": "tree_view_record_id: causes a warning in the logs\nin the runbot logs I get:\n\n2015-07-17 13:09:05,793 27838 WARNING 3110977-7-0-458127-all openerp.modules.loading: The model module.tree.view.record.id.installed has no access rules, consider adding one. E.g. access_module_tree_view_record_id_installed,access_module_tree_view_record_id_installed,model_module_tree_view_record_id_installed,,1,1,1,1\n\nI tracked down module.tree.view.record.id.installed to tree_view_record_id\n\nI totally don't understand why the pseudo dynamic a weird name generated that way, but an ACL is missing\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n###############################################################################\n#\n#    OpenERP, Open Source Management Solution\n#    This module copyright (C) 2010 - 2014 Savoir-faire Linux\n#    (<http://www.savoirfairelinux.com>).\n#\n#    This program is free software: you can redistribute it and/or modify\n#    it under the terms of the GNU Affero General Public License as\n#    published by the Free Software Foundation, either version 3 of the\n#    License, or (at your option) any later version.\n#\n#    This program is distributed in the hope that it will be useful,\n#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#    GNU Affero General Public License for more details.\n#\n#    You should have received a copy of the GNU Affero General Public License\n#    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n###############################################################################\n\nimport logging\nimport cgitb\n\nfrom openerp.tools import config\nfrom openerp.addons.web.controllers.main import Session\n\n_DEFAULT_LOGGING_LEVEL = logging.ERROR\n\ntry:\n    from .odoo_sentry_client import OdooClient\n    from .odoo_sentry_handler import OdooSentryHandler\n\n    root_logger = logging.root\n\n    processors = (\n        'raven.processors.SanitizePasswordsProcessor',\n        'raven_sanitize_openerp.OpenerpPasswordsProcessor'\n    )\n    if config.get(u'sentry_dsn'):\n        cgitb.enable()\n        # Get DSN info from config file or ~/.openerp_serverrc (recommended)\n        dsn = config.get('sentry_dsn')\n        try:\n            level = getattr(logging, config.get('sentry_logging_level'))\n        except (AttributeError, TypeError):\n            level = _DEFAULT_LOGGING_LEVEL\n        # Create Client\n        client = OdooClient(\n            dsn=dsn,\n            processors=processors,\n        )\n        handler = OdooSentryHandler(client, level=level)\n        root_logger.addHandler(handler)\n    else:\n        root_logger.warn(u\"Sentry DSN not defined in config file\")\n        client = None\n\n    # Inject sentry_activated to session to display error message or not\n    old_session_info = Session.session_info\n\n    def session_info(self, req):\n        res = old_session_info(self, req)\n        res['sentry_activated'] = bool(client)\n        return res\n\n    Session.session_info = session_info\nexcept ImportError:\n    pass\n", "path": "sentry_logger/__init__.py"}, {"content": "# -*- coding: utf-8 -*-\n###############################################################################\n#\n#   Copyright (C) 2012-TODAY Akretion <http://www.akretion.com>.\n#     All Rights Reserved\n#     @author David BEAL <david.beal@akretion.com>\n#   This program is free software: you can redistribute it and/or modify\n#   it under the terms of the GNU Affero General Public License as\n#   published by the Free Software Foundation, either version 3 of the\n#   License, or (at your option) any later version.\n#\n#   This program is distributed in the hope that it will be useful,\n#   but WITHOUT ANY WARRANTY; without even the implied warranty of\n#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#   GNU Affero General Public License for more details.\n#\n#   You should have received a copy of the GNU Affero General Public License\n#   along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n###############################################################################\n\n{\n    'name': 'Tree View Record Id',\n    'version': '0.1',\n    'category': 'Other modules',\n    'sequence': 10,\n    'author': \"Akretion,Odoo Community Association (OCA)\",\n    'summary': \"Adds id field to tree views\",\n    'description': \"\"\"\nAdds Id field in all tree views of any modules/models, except:\n\n* Arborescent tree views like 'Products by Category', 'Chart of accounts', etc.\n* Tree views (like in wizard 'Change password') built on transient models\n  which don't have this column in their table.\n\nId field is the primary key of standard sql tables\ndefined by the orm (Odoo model).\n    \"\"\",\n    'website': 'http://www.akretion.com',\n    'depends': [\n        'base',\n    ],\n    'data': [\n    ],\n    'demo': [\n    ],\n    'installable': True,\n    'auto_install': False,\n    'application': False,\n    'images': [\n    ],\n    'css': [\n    ],\n    'js': [\n    ],\n    'qweb': [\n    ],\n}\n", "path": "tree_view_record_id/__openerp__.py"}]}