{"action":"opened","issue":{"url":"https://api.github.com/repos/OCA/project/issues/440","repository_url":"https://api.github.com/repos/OCA/project","labels_url":"https://api.github.com/repos/OCA/project/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/OCA/project/issues/440/comments","events_url":"https://api.github.com/repos/OCA/project/issues/440/events","html_url":"https://github.com/OCA/project/issues/440","id":367962420,"node_id":"MDU6SXNzdWUzNjc5NjI0MjA=","number":440,"title":"Error while installing Project Key on Odoo 11 ce with Demo Data","user":{"login":"wshamasneh","id":19633974,"node_id":"MDQ6VXNlcjE5NjMzOTc0","avatar_url":"https://avatars0.githubusercontent.com/u/19633974?v=4","gravatar_id":"","url":"https://api.github.com/users/wshamasneh","html_url":"https://github.com/wshamasneh","followers_url":"https://api.github.com/users/wshamasneh/followers","following_url":"https://api.github.com/users/wshamasneh/following{/other_user}","gists_url":"https://api.github.com/users/wshamasneh/gists{/gist_id}","starred_url":"https://api.github.com/users/wshamasneh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wshamasneh/subscriptions","organizations_url":"https://api.github.com/users/wshamasneh/orgs","repos_url":"https://api.github.com/users/wshamasneh/repos","events_url":"https://api.github.com/users/wshamasneh/events{/privacy}","received_events_url":"https://api.github.com/users/wshamasneh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T21:39:45Z","updated_at":"2018-10-08T21:39:45Z","closed_at":null,"author_association":"NONE","body":"An error is show up while installing Project Key on Odoo 11 ce with Demo Data.\r\nthe error is as the following:\r\n\r\nError:\r\nOdoo Server Error\r\n\r\nTraceback (most recent call last):\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\tools\\safe_eval.py\", line 350, in safe_eval\r\n    return unsafe_eval(c, globals_dict, locals_dict)\r\n  File \"\", line 1, in <module>\r\n  File \"<decorator-gen-42>\", line 2, in button_immediate_install\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 71, in check_and_log\r\n    return method(self, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 449, in button_immediate_install\r\n    return self._button_immediate_function(type(self).button_install)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 542, in _button_immediate_function\r\n    modules.registry.Registry.new(self._cr.dbname, update_module=True)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\registry.py\", line 85, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 380, in load_modules\r\n    loaded_modules, update_module, models_to_check)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 274, in load_marked_modules\r\n    perform_checks=perform_checks, models_to_check=models_to_check\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 200, in load_module_graph\r\n    getattr(py_module, post_init)(cr, registry)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\hooks.py\", line 8, in post_init_hook\r\n    env['project.project']._set_default_project_key()\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\models\\project_project.py\", line 179, in _set_default_project_key\r\n    ]):\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\fields.py\", line 980, in __set__\r\n    record.write({self.name: write_value})\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\models\\project_project.py\", line 55, in write\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project\\models\\project.py\", line 270, in write\r\n    res = super(Project, self).write(vals) if vals else True\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\mail\\models\\mail_thread.py\", line 282, in write\r\n    result = super(MailThread, self).write(values)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web_syncer\\models\\syncer.py\", line 106, in write\r\n    return super(Base, self).write(vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\models.py\", line 3089, in write\r\n    self._write(old_vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web_syncer\\models\\syncer.py\", line 93, in _write\r\n    return super(Base, self)._write(vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\models.py\", line 3190, in _write\r\n    cr.execute(query, params + (sub_ids,))\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\sql_db.py\", line 155, in wrapper\r\n    return f(self, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\sql_db.py\", line 232, in execute\r\n    res = self._obj.execute(query, params)\r\npsycopg2.IntegrityError: duplicate key value violates unique constraint \"project_project_project_key_unique\"\r\nDETAIL:  Key (key)=(IP) already exists.\r\n\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 650, in _handle_exception\r\n    return super(JsonRequest, self)._handle_exception(exception)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 310, in _handle_exception\r\n    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\tools\\pycompat.py\", line 87, in reraise\r\n    raise value\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 692, in dispatch\r\n    result = self._call_function(**self.params)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 342, in _call_function\r\n    return checked_call(self.db, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\service\\model.py\", line 97, in wrapper\r\n    return f(dbname, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 335, in checked_call\r\n    result = self.endpoint(*a, **kw)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web_syncer\\http.py\", line 9, in __call__\r\n    result = self.method(*args, **kw)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\http.py\", line 515, in response_wrap\r\n    response = f(*args, **kw)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web\\controllers\\main.py\", line 1231, in run\r\n    result = request.env['ir.actions.server'].browse([action_id]).run()\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\ir\\ir_actions.py\", line 554, in run\r\n    res = func(action, eval_context=eval_context)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\website\\models\\ir_actions.py\", line 57, in run_action_code_multi\r\n    res = super(ServerAction, self).run_action_code_multi(action, eval_context)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\ir\\ir_actions.py\", line 430, in run_action_code_multi\r\n    safe_eval(action.sudo().code.strip(), eval_context, mode=\"exec\", nocopy=True)  # nocopy allows to return 'action'\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\tools\\safe_eval.py\", line 373, in safe_eval\r\n    pycompat.reraise(ValueError, ValueError('%s: \"%s\" while evaluating\\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\tools\\pycompat.py\", line 86, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\tools\\safe_eval.py\", line 350, in safe_eval\r\n    return unsafe_eval(c, globals_dict, locals_dict)\r\n  File \"\", line 1, in <module>\r\n  File \"<decorator-gen-42>\", line 2, in button_immediate_install\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 71, in check_and_log\r\n    return method(self, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 449, in button_immediate_install\r\n    return self._button_immediate_function(type(self).button_install)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\base\\module\\module.py\", line 542, in _button_immediate_function\r\n    modules.registry.Registry.new(self._cr.dbname, update_module=True)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\registry.py\", line 85, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 380, in load_modules\r\n    loaded_modules, update_module, models_to_check)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 274, in load_marked_modules\r\n    perform_checks=perform_checks, models_to_check=models_to_check\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\modules\\loading.py\", line 200, in load_module_graph\r\n    getattr(py_module, post_init)(cr, registry)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\hooks.py\", line 8, in post_init_hook\r\n    env['project.project']._set_default_project_key()\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\models\\project_project.py\", line 179, in _set_default_project_key\r\n    ]):\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\fields.py\", line 980, in __set__\r\n    record.write({self.name: write_value})\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project_key\\models\\project_project.py\", line 55, in write\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\project\\models\\project.py\", line 270, in write\r\n    res = super(Project, self).write(vals) if vals else True\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\mail\\models\\mail_thread.py\", line 282, in write\r\n    result = super(MailThread, self).write(values)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web_syncer\\models\\syncer.py\", line 106, in write\r\n    return super(Base, self).write(vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\models.py\", line 3089, in write\r\n    self._write(old_vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\addons\\web_syncer\\models\\syncer.py\", line 93, in _write\r\n    return super(Base, self)._write(vals)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\models.py\", line 3190, in _write\r\n    cr.execute(query, params + (sub_ids,))\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\sql_db.py\", line 155, in wrapper\r\n    return f(self, *args, **kwargs)\r\n  File \"D:\\Program Files (x86)\\Odoo 11.0\\server\\odoo\\sql_db.py\", line 232, in execute\r\n    res = self._obj.execute(query, params)\r\nValueError: <class 'psycopg2.IntegrityError'>: \"duplicate key value violates unique constraint \"project_project_project_key_unique\"\r\nDETAIL:  Key (key)=(IP) already exists.\r\n\" while evaluating\r\n'records.button_immediate_install()'"}}
{"actor":{"display_login":"wshamasneh"}}