{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/15719","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/15719/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/15719/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/15719/events","html_url":"https://github.com/odoo/odoo/issues/15719","id":212013538,"number":15719,"title":"Issue removing any module - Ubuntu 16.04 + Odoo 10.00","user":{"login":"gustavocp","id":487595,"avatar_url":"https://avatars3.githubusercontent.com/u/487595?v=4","gravatar_id":"","url":"https://api.github.com/users/gustavocp","html_url":"https://github.com/gustavocp","followers_url":"https://api.github.com/users/gustavocp/followers","following_url":"https://api.github.com/users/gustavocp/following{/other_user}","gists_url":"https://api.github.com/users/gustavocp/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavocp/subscriptions","organizations_url":"https://api.github.com/users/gustavocp/orgs","repos_url":"https://api.github.com/users/gustavocp/repos","events_url":"https://api.github.com/users/gustavocp/events{/privacy}","received_events_url":"https://api.github.com/users/gustavocp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-03-06T03:08:46Z","updated_at":"2018-02-27T08:05:06Z","closed_at":"2017-03-10T18:06:15Z","author_association":"NONE","body":"Impacted versions: 10.00\r\n\r\nSteps to reproduce: i just installed using tutorial https://www.virtual-server.org/blog/install-odoo-10-on-ubuntu-16-04/ and then install module CRM, Project, Sales, Discuss. Just try to remove any module\r\n\r\nCurrent behavior: loose all data from modules\r\n\r\nExpected behavior: just unistall or install (simple operation)\r\n\r\nERROR FROM LOG\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_alias ALTER COLUMN alias_model_id SET NOT NULL\r\n2017-03-06 03:03:38,331 29184 WARNING odoo odoo.models.schema: Table 'mail_followers': unable to set a NOT NULL constraint on column 'res_model' !\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_followers ALTER COLUMN res_model SET NOT NULL\r\n2017-03-06 03:03:38,354 29184 INFO odoo odoo.sql_db: bad query: ALTER TABLE \"mail_followers\" ADD CONSTRAINT \"mail_followers_partner_xor_channel\" CHECK((partner_id IS NULL) != (channel_id IS NULL))\r\n2017-03-06 03:03:38,355 29184 WARNING odoo odoo.models.schema: Table 'mail_followers': unable to add constraint 'CHECK((partner_id IS NULL) != (channel_id IS NULL))'!\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE \"mail_followers\" ADD CONSTRAINT \"mail_followers_partner_xor_channel\" CHECK((partner_id IS NULL) != (channel_id IS NULL))\r\n2017-03-06 03:03:38,409 29184 WARNING odoo odoo.models.schema: Table 'mail_mail': unable to set a NOT NULL constraint on column 'mail_message_id' !\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_mail ALTER COLUMN mail_message_id SET NOT NULL\r\n2017-03-06 03:03:38,441 29184 WARNING odoo odoo.models.schema: Table 'mail_channel': unable to set a NOT NULL constraint on column 'alias_id' !\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_channel ALTER COLUMN alias_id SET NOT NULL\r\n2017-03-06 03:03:38,451 29184 WARNING odoo odoo.models.schema: Table 'mail_channel': unable to set a NOT NULL constraint on column 'name' !\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_channel ALTER COLUMN name SET NOT NULL\r\n2017-03-06 03:03:38,563 29184 INFO odoo odoo.addons.auth_crypt.models.res_users: Hashing passwords, may be slow for databases with many users...\r\n2017-03-06 03:03:38,689 29184 ERROR odoo odoo.modules.registry: Failed to load registry\r\nTraceback (most recent call last):\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 78, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 339, in load_modules\r\n    loaded_modules, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 237, in load_marked_modules\r\n    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 136, in load_module_graph\r\n    registry.init_models(cr, model_names, {'module': package.name})\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 315, in init_models\r\n    model._auto_init()\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2503, in _auto_init\r\n    self._init_column(name)\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2273, in _init_column\r\n    value = field.default(self)\r\n  File \"/odoo/odoo-server/addons/mail/wizard/mail_compose_message.py\", line 126, in <lambda>\r\n    subtype_id = fields.Many2one(default=lambda self: self.sudo().env.ref('mail.mt_comment', raise_if_not_found=False).id)\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n2017-03-06 03:03:38,690 29184 ERROR odoo odoo.http: Exception during JSON request handling.\r\nTraceback (most recent call last):\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 638, in _handle_exception\r\n    return super(JsonRequest, self)._handle_exception(exception)\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 675, in dispatch\r\n    result = self._call_function(**self.params)\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 331, in _call_function\r\n    return checked_call(self.db, *args, **kwargs)\r\n  File \"/odoo/odoo-server/odoo/service/model.py\", line 119, in wrapper\r\n    return f(dbname, *args, **kwargs)\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 324, in checked_call\r\n    result = self.endpoint(*a, **kw)\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 933, in __call__\r\n    return self.method(*args, **kw)\r\n  File \"/odoo/odoo-server/odoo/http.py\", line 504, in response_wrap\r\n    response = f(*args, **kw)\r\n  File \"/odoo/odoo-server/addons/web/controllers/main.py\", line 882, in call_button\r\n    action = self._call_kw(model, method, args, {})\r\n  File \"/odoo/odoo-server/addons/web/controllers/main.py\", line 870, in _call_kw\r\n    return call_kw(request.env[model], method, args, kwargs)\r\n  File \"/odoo/odoo-server/odoo/api.py\", line 681, in call_kw\r\n    return call_kw_multi(method, model, args, kwargs)\r\n  File \"/odoo/odoo-server/odoo/api.py\", line 672, in call_kw_multi\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/odoo/odoo-server/odoo/addons/base/module/module.py\", line 410, in button_immediate_install\r\n    return self._button_immediate_function(type(self).button_install)\r\n  File \"/odoo/odoo-server/odoo/addons/base/module/module.py\", line 484, in _button_immediate_function\r\n    modules.registry.Registry.new(self._cr.dbname, update_module=True)\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 78, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 339, in load_modules\r\n    loaded_modules, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 237, in load_marked_modules\r\n    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 136, in load_module_graph\r\n    registry.init_models(cr, model_names, {'module': package.name})\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 315, in init_models\r\n    model._auto_init()\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2503, in _auto_init\r\n    self._init_column(name)\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2273, in _init_column\r\n    value = field.default(self)\r\n  File \"/odoo/odoo-server/addons/mail/wizard/mail_compose_message.py\", line 126, in <lambda>\r\n    subtype_id = fields.Many2one(default=lambda self: self.sudo().env.ref('mail.mt_comment', raise_if_not_found=False).id)\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n2017-03-06 03:03:38,691 29184 INFO odoo werkzeug: 187.180.232.85 - - [06/Mar/2017 03:03:38] \"POST /web/dataset/call_button HTTP/1.1\" 200 -\r\nIf you want to have it, you should update the records and execute manually:\r\nALTER TABLE mail_channel ALTER COLUMN name SET NOT NULL\r\n2017-03-06 03:03:38,563 29184 INFO odoo odoo.addons.auth_crypt.models.res_users: Hashing passwords, may be slow for databases with many users...\r\n2017-03-06 03:03:38,689 29184 ERROR odoo odoo.modules.registry: Failed to load registry\r\nTraceback (most recent call last):\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 78, in new\r\n    odoo.modules.load_modules(registry._db, force_demo, status, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 339, in load_modules\r\n    loaded_modules, update_module)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 237, in load_marked_modules\r\n    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)\r\n  File \"/odoo/odoo-server/odoo/modules/loading.py\", line 136, in load_module_graph\r\n    registry.init_models(cr, model_names, {'module': package.name})\r\n  File \"/odoo/odoo-server/odoo/modules/registry.py\", line 315, in init_models\r\n    model._auto_init()\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2503, in _auto_init\r\n    self._init_column(name)\r\n  File \"/odoo/odoo-server/odoo/models.py\", line 2273, in _init_column\r\n    value = field.default(self)\r\n  File \"/odoo/odoo-server/addons/mail/wizard/mail_compose_message.py\", line 126, in <lambda>\r\n    subtype_id = fields.Many2one(default=lambda self: self.sudo().env.ref('mail.mt_comment', raise_if_not_found=False).id)\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n2017-03-06 03:03:38,690 29184 ERROR odoo odoo.http: Exception during JSON request handling.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/368779964","html_url":"https://github.com/odoo/odoo/issues/15719#issuecomment-368779964","issue_url":"https://api.github.com/repos/odoo/odoo/issues/15719","id":368779964,"user":{"login":"JKE-be","id":4848797,"avatar_url":"https://avatars2.githubusercontent.com/u/4848797?v=4","gravatar_id":"","url":"https://api.github.com/users/JKE-be","html_url":"https://github.com/JKE-be","followers_url":"https://api.github.com/users/JKE-be/followers","following_url":"https://api.github.com/users/JKE-be/following{/other_user}","gists_url":"https://api.github.com/users/JKE-be/gists{/gist_id}","starred_url":"https://api.github.com/users/JKE-be/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKE-be/subscriptions","organizations_url":"https://api.github.com/users/JKE-be/orgs","repos_url":"https://api.github.com/users/JKE-be/repos","events_url":"https://api.github.com/users/JKE-be/events{/privacy}","received_events_url":"https://api.github.com/users/JKE-be/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T08:05:06Z","updated_at":"2018-02-27T08:05:06Z","author_association":"CONTRIBUTOR","body":"-i mail instead of -u to force réinitialisation from default data "}}
{"actor":{"display_login":"JKE-be"}}