{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/25078","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/25078/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/25078/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/25078/events","html_url":"https://github.com/odoo/odoo/issues/25078","id":329558178,"node_id":"MDU6SXNzdWUzMjk1NTgxNzg=","number":25078,"title":"[11]Could not reinstall website module","user":{"login":"sswapnesh","id":16624719,"node_id":"MDQ6VXNlcjE2NjI0NzE5","avatar_url":"https://avatars1.githubusercontent.com/u/16624719?v=4","gravatar_id":"","url":"https://api.github.com/users/sswapnesh","html_url":"https://github.com/sswapnesh","followers_url":"https://api.github.com/users/sswapnesh/followers","following_url":"https://api.github.com/users/sswapnesh/following{/other_user}","gists_url":"https://api.github.com/users/sswapnesh/gists{/gist_id}","starred_url":"https://api.github.com/users/sswapnesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sswapnesh/subscriptions","organizations_url":"https://api.github.com/users/sswapnesh/orgs","repos_url":"https://api.github.com/users/sswapnesh/repos","events_url":"https://api.github.com/users/sswapnesh/events{/privacy}","received_events_url":"https://api.github.com/users/sswapnesh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-05T17:42:13Z","updated_at":"2018-06-05T17:50:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Impacted versions: 11\r\nRunbot Link: [http://334767-11-0-6ad1a3.runbot12.odoo.com/web?debug=1#view_type=kanban&model=ir.module.module&action=31](http://334767-11-0-6ad1a3.runbot12.odoo.com/web?debug=1#view_type=kanban&model=ir.module.module&action=31)\r\nSteps to reproduce: Install module which has Website as Dependency (Survey)\r\nUninstall Website module --> Re-Install Website module\r\nCurrent behavior:\r\n```\r\nThe operation cannot be completed, probably due to the following:\r\n- deletion: you may be trying to delete a record while other records still reference it\r\n- creation/update: a mandatory field is not correctly set\r\n\r\n[object with reference: website - website]\r\n```\r\nExpected behavior: Successful Installation\r\n\r\nVideo/Screenshot link (optional):\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/394800800","html_url":"https://github.com/odoo/odoo/issues/25078#issuecomment-394800800","issue_url":"https://api.github.com/repos/odoo/odoo/issues/25078","id":394800800,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDgwMDgwMA==","user":{"login":"sswapnesh","id":16624719,"node_id":"MDQ6VXNlcjE2NjI0NzE5","avatar_url":"https://avatars1.githubusercontent.com/u/16624719?v=4","gravatar_id":"","url":"https://api.github.com/users/sswapnesh","html_url":"https://github.com/sswapnesh","followers_url":"https://api.github.com/users/sswapnesh/followers","following_url":"https://api.github.com/users/sswapnesh/following{/other_user}","gists_url":"https://api.github.com/users/sswapnesh/gists{/gist_id}","starred_url":"https://api.github.com/users/sswapnesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sswapnesh/subscriptions","organizations_url":"https://api.github.com/users/sswapnesh/orgs","repos_url":"https://api.github.com/users/sswapnesh/repos","events_url":"https://api.github.com/users/sswapnesh/events{/privacy}","received_events_url":"https://api.github.com/users/sswapnesh/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T17:50:07Z","updated_at":"2018-06-05T17:50:07Z","author_association":"CONTRIBUTOR","body":"Log from Local system\r\n\r\n```\r\n2018-06-05 17:48:29,439 10452 INFO blabla odoo.models: Storing computed values of website.default_lang_code\r\n2018-06-05 17:48:29,831 10452 ERROR blabla odoo.sql_db: bad query: b'ALTER TABLE \"res_config_settings\" ADD FOREIGN KEY (\"website_id\") REFERENCES \"website\"(\"id\") ON DELETE set null'\r\nERROR: insert or update on table \"res_config_settings\" violates foreign key constraint \"res_config_settings_website_id_fkey\"\r\nDETAIL:  Key (website_id)=(1) is not present in table \"website\".\r\n\r\n2018-06-05 17:48:29,833 10452 WARNING blabla odoo.modules.loading: Transient module states were reset\r\n2018-06-05 17:48:29,835 10452 ERROR blabla odoo.modules.registry: Failed to load registry\r\nTraceback (most recent call last):\r\n  File \"/home/swapnesh/Workspace/11/odoo/modules/registry.py\", line 85, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"/home/swapnesh/Workspace/11/odoo/modules/loading.py\", line 371, in load_modules\r\n    loaded_modules, update_module, models_to_check)\r\n  File \"/home/swapnesh/Workspace/11/odoo/modules/loading.py\", line 265, in load_marked_modules\r\n    perform_checks=perform_checks, models_to_check=models_to_check\r\n  File \"/home/swapnesh/Workspace/11/odoo/modules/loading.py\", line 144, in load_module_graph\r\n    registry.init_models(cr, model_names, {'module': package.name})\r\n  File \"/home/swapnesh/Workspace/11/odoo/modules/registry.py\", line 313, in init_models\r\n    func()\r\n  File \"/home/swapnesh/Workspace/11/odoo/fields.py\", line 1956, in update_db_foreign_key\r\n    new = process(model._cr, model._table, self.name, comodel._table, 'id', self.ondelete or 'set null')\r\n  File \"/home/swapnesh/Workspace/11/odoo/tools/sql.py\", line 177, in fix_foreign_key\r\n    return add_foreign_key(cr, tablename1, columnname1, tablename2, columnname2, ondelete)\r\n  File \"/home/swapnesh/Workspace/11/odoo/tools/sql.py\", line 150, in add_foreign_key\r\n    cr.execute(query.format(tablename1, columnname1, tablename2, columnname2, ondelete))\r\n  File \"/home/swapnesh/Workspace/11/odoo/sql_db.py\", line 155, in wrapper\r\n    return f(self, *args, **kwargs)\r\n  File \"/home/swapnesh/Workspace/11/odoo/sql_db.py\", line 232, in execute\r\n    res = self._obj.execute(query, params)\r\npsycopg2.IntegrityError: insert or update on table \"res_config_settings\" violates foreign key constraint \"res_config_settings_website_id_fkey\"\r\nDETAIL:  Key (website_id)=(1) is not present in table \"website\".\r\n\r\n\r\n```"}}
{"actor":{"display_login":"sswapnesh"}}