{"action":"closed","issue":{"url":"https://api.github.com/repos/OCA/hr-timesheet/issues/33","labels_url":"https://api.github.com/repos/OCA/hr-timesheet/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/OCA/hr-timesheet/issues/33/comments","events_url":"https://api.github.com/repos/OCA/hr-timesheet/issues/33/events","html_url":"https://github.com/OCA/hr-timesheet/issues/33","id":74486540,"number":33,"title":"RuntimeError: maximum recursion depth exceeded","user":{"login":"miscs","id":878463,"avatar_url":"https://avatars.githubusercontent.com/u/878463?v=3","gravatar_id":"","url":"https://api.github.com/users/miscs","html_url":"https://github.com/miscs","followers_url":"https://api.github.com/users/miscs/followers","following_url":"https://api.github.com/users/miscs/following{/other_user}","gists_url":"https://api.github.com/users/miscs/gists{/gist_id}","starred_url":"https://api.github.com/users/miscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miscs/subscriptions","organizations_url":"https://api.github.com/users/miscs/orgs","repos_url":"https://api.github.com/users/miscs/repos","events_url":"https://api.github.com/users/miscs/events{/privacy}","received_events_url":"https://api.github.com/users/miscs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-08T20:33:42Z","updated_at":"2015-06-02T08:21:26Z","closed_at":"2015-06-02T08:21:26Z","body":"timesheet_task plugin\r\n\r\nSince latest Pull from odoo 8.0 master, I run into \"RuntimeError: maximum recursion depth exceeded\" every time when I \r\n\r\n- add a task to a project\r\n- track time for a task using HR-> My current timesheet\r\n\r\nwhen I disable the timesheet_task plugin everything is working without problems. The stack trace is very long (as you might imagine), but the interesting part is:\r\n...\r\nFile \"/opt/odoo/odoo-server/addons/timesheet_task/project_task.py\", line 77, in _store_set_values\r\n   project.write({'parent_id': project.parent_id.id})\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 239, in wrapper\r\n   return new_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 546, in new_api\r\n   result = method(self._model, cr, uid, self.ids, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/addons/project/project.py\", line 546, in write\r\n   return super(project, self).write(cr, uid, ids, vals, context=context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/addons/mail/mail_thread.py\", line 434, in write\r\n   result = super(mail_thread, self).write(cr, uid, ids, values, context=context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 363, in old_api\r\n   result = method(recs, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/models.py\", line 3768, in write\r\n   self._write(old_vals)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 239, in wrapper\r\n   return new_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 546, in new_api\r\n   result = method(self._model, cr, uid, self.ids, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/models.py\", line 3931, in _write\r\n   self.pool[table].write(cr, user, nids, v, context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/addons/project/project.py\", line 1237, in write\r\n   return super(account_analytic_account, self).write(cr, uid, ids, vals, context=context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/addons/mail/mail_thread.py\", line 434, in write\r\n   result = super(mail_thread, self).write(cr, uid, ids, values, context=context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 363, in old_api\r\n   result = method(recs, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/models.py\", line 3768, in write\r\n   self._write(old_vals)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 239, in wrapper\r\n   return new_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 546, in new_api\r\n   result = method(self._model, cr, uid, self.ids, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/openerp/models.py\", line 4010, in _write\r\n   self.pool[model_name]._store_set_values(cr, user, todo, fields_to_recompute, context)\r\n File \"/opt/odoo/odoo-server/openerp/api.py\", line 241, in wrapper\r\n   return old_api(self, *args, **kwargs)\r\n File \"/opt/odoo/odoo-server/addons/timesheet_task/project_task.py\", line 77, in _store_set_values\r\n   project.write({'parent_id': project.parent_id.id})\r\n... \r\n\r\nI looked into project_task.py, line 77, which I don't understand completely :( but when I disable the for-statement beginning in line 74 the recursion-bug won't pop up, but I don´t know what I am missing now.\r\n \r\n```\r\n#for row in self.browse(cr, SUPERUSER_ID, ids, context=context):\r\n#            if row.project_id:\r\n#                project = row.project_id\r\n#                project.write({'parent_id': project.parent_id.id})\r\n```\r\n\r\nWhat is this code snipped for? How to prevent infinite recursions with the newest odoo 8.0 master codebase?\r\n\r\nI also added some logging ant row.project_id is always the same in my case (project.project(37,)) when adding a new task.\r\n\r\nThank you for any help / hints!\r\nSteve\r\n"}}