{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/13199","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/13199/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/13199/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/13199/events","html_url":"https://github.com/odoo/odoo/pull/13199","id":171871733,"number":13199,"title":"Undeprecate `@api.one`.","user":{"login":"Yajo","id":973709,"avatar_url":"https://avatars.githubusercontent.com/u/973709?v=3","gravatar_id":"","url":"https://api.github.com/users/Yajo","html_url":"https://github.com/Yajo","followers_url":"https://api.github.com/users/Yajo/followers","following_url":"https://api.github.com/users/Yajo/following{/other_user}","gists_url":"https://api.github.com/users/Yajo/gists{/gist_id}","starred_url":"https://api.github.com/users/Yajo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yajo/subscriptions","organizations_url":"https://api.github.com/users/Yajo/orgs","repos_url":"https://api.github.com/users/Yajo/repos","events_url":"https://api.github.com/users/Yajo/events{/privacy}","received_events_url":"https://api.github.com/users/Yajo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rco-odoo","id":7578141,"avatar_url":"https://avatars.githubusercontent.com/u/7578141?v=3","gravatar_id":"","url":"https://api.github.com/users/rco-odoo","html_url":"https://github.com/rco-odoo","followers_url":"https://api.github.com/users/rco-odoo/followers","following_url":"https://api.github.com/users/rco-odoo/following{/other_user}","gists_url":"https://api.github.com/users/rco-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/rco-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rco-odoo/subscriptions","organizations_url":"https://api.github.com/users/rco-odoo/orgs","repos_url":"https://api.github.com/users/rco-odoo/repos","events_url":"https://api.github.com/users/rco-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/rco-odoo/received_events","type":"User","site_admin":false},"assignees":[{"login":"rco-odoo","id":7578141,"avatar_url":"https://avatars.githubusercontent.com/u/7578141?v=3","gravatar_id":"","url":"https://api.github.com/users/rco-odoo","html_url":"https://github.com/rco-odoo","followers_url":"https://api.github.com/users/rco-odoo/followers","following_url":"https://api.github.com/users/rco-odoo/following{/other_user}","gists_url":"https://api.github.com/users/rco-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/rco-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rco-odoo/subscriptions","organizations_url":"https://api.github.com/users/rco-odoo/orgs","repos_url":"https://api.github.com/users/rco-odoo/repos","events_url":"https://api.github.com/users/rco-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/rco-odoo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-08-18T10:42:55Z","updated_at":"2016-08-22T23:38:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/13199","html_url":"https://github.com/odoo/odoo/pull/13199","diff_url":"https://github.com/odoo/odoo/pull/13199.diff","patch_url":"https://github.com/odoo/odoo/pull/13199.patch"},"body":"Description of the issue/feature this PR addresses:\r\n\r\nQuoting from https://github.com/OCA/pylint-odoo/issues/45#issue-163891444:\r\n\r\n> Odoo recommend us not using api.one: #8527\r\n> After odoo use api.one in v9: 8ac40ac\r\n> A issue for this case was created: #12408\r\n\r\n> Odoo answer: odoo/odoo#12408 (comment)\r\n\r\nCurrent behavior before PR: The decorator works fine, but the real problem is that people expect what they should not from it. v8-v10 uses it, and no deprecation warning is issued in the logs.\r\n\r\nThe same as you could find yourself using `@api.one` where you shuldn't, now with the deprecation warning you keep seeing methods written in `@api.multi` where they shouldn't, like:\r\n\r\n```\r\n@api.multi\r\ndef do_something(self):\r\n    for s in self:\r\n        s.field1 = s.field2.get_field1()\r\n```\r\n\r\nDesired behavior after PR is merged: Instead of deprecating it, we document it. Now it's crystal clear what the decorator is for and what not, what you could expect from it if you use it for unexpected purposes.\r\n\r\nSo, after merging this, then this statement https://github.com/odoo/odoo/pull/8527#issuecomment-147336152 should not be true anymore, and thus there will be no need to deprecate this, given it's a great tool when used correctly.\r\n\r\n--\r\nI confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr\r\n@Tecnativa"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/241584054","html_url":"https://github.com/odoo/odoo/pull/13199#issuecomment-241584054","issue_url":"https://api.github.com/repos/odoo/odoo/issues/13199","id":241584054,"user":{"login":"adrianmerrall","id":5387188,"avatar_url":"https://avatars.githubusercontent.com/u/5387188?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianmerrall","html_url":"https://github.com/adrianmerrall","followers_url":"https://api.github.com/users/adrianmerrall/followers","following_url":"https://api.github.com/users/adrianmerrall/following{/other_user}","gists_url":"https://api.github.com/users/adrianmerrall/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmerrall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmerrall/subscriptions","organizations_url":"https://api.github.com/users/adrianmerrall/orgs","repos_url":"https://api.github.com/users/adrianmerrall/repos","events_url":"https://api.github.com/users/adrianmerrall/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmerrall/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T23:38:49Z","updated_at":"2016-08-22T23:38:49Z","body":"+1\n\n\n\nOn 20 August 2016 at 01:38, David Beal <notifications@github.com> wrote:\n\n> 👍\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/odoo/odoo/pull/13199#issuecomment-241020536>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AFIztGxwyFMa-MZp6tEqClZfbP48Qae_ks5qhbHZgaJpZM4JnXMe>\n> .\n>\n"}}
{"actor":{"display_login":"adrianmerrall"}}