{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/comments/34473942","id":34473942,"diff_hunk":"@@ -128,26 +124,17 @@ def create_reversals(self, cr, uid, ids, reversal_date,\n \n         :return: Returns a list of ids of the created reversal moves\n         \"\"\"\n-        if isinstance(ids, (int, long)):\n-            ids = [ids]\n-\n-        reversed_move_ids = []\n-        for src_move in self.browse(cr, uid, ids, context=context):\n-            if src_move.reversal_id:\n-                continue  # skip the reversal creation if already done\n-\n-            reversal_move_id = self._move_reversal(\n-                cr, uid,\n-                src_move,\n-                reversal_date,\n-                reversal_period_id=reversal_period_id,\n-                reversal_journal_id=reversal_journal_id,\n-                move_prefix=move_prefix,\n-                move_line_prefix=move_line_prefix,\n-                context=context\n-            )\n+        if self.reversal_id:\n+            return\n \n-            if reversal_move_id:\n-                reversed_move_ids.append(reversal_move_id)\n+        self.ensure_one()","path":"account_reversal/account_reversal.py","position":171,"original_position":171,"commit_id":"459cc49e513c7fbcd34dce45387c577b596aad9e","original_commit_id":"459cc49e513c7fbcd34dce45387c577b596aad9e","user":{"login":"sbidoul","id":692075,"avatar_url":"https://avatars.githubusercontent.com/u/692075?v=3","gravatar_id":"","url":"https://api.github.com/users/sbidoul","html_url":"https://github.com/sbidoul","followers_url":"https://api.github.com/users/sbidoul/followers","following_url":"https://api.github.com/users/sbidoul/following{/other_user}","gists_url":"https://api.github.com/users/sbidoul/gists{/gist_id}","starred_url":"https://api.github.com/users/sbidoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbidoul/subscriptions","organizations_url":"https://api.github.com/users/sbidoul/orgs","repos_url":"https://api.github.com/users/sbidoul/repos","events_url":"https://api.github.com/users/sbidoul/events{/privacy}","received_events_url":"https://api.github.com/users/sbidoul/received_events","type":"User","site_admin":false},"body":"With the loop in the old API versions we could reverse several move at once. That is a useful feature to preserve.","created_at":"2015-07-13T15:19:33Z","updated_at":"2015-07-13T15:19:33Z","html_url":"https://github.com/OCA/account-financial-tools/pull/251#discussion_r34473942","pull_request_url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251","_links":{"self":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/comments/34473942"},"html":{"href":"https://github.com/OCA/account-financial-tools/pull/251#discussion_r34473942"},"pull_request":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251","id":38911379,"html_url":"https://github.com/OCA/account-financial-tools/pull/251","diff_url":"https://github.com/OCA/account-financial-tools/pull/251.diff","patch_url":"https://github.com/OCA/account-financial-tools/pull/251.patch","issue_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/251","number":251,"state":"open","locked":false,"title":"account_reversal - Rewritten for new api","user":{"login":"bwrsandman","id":1013356,"avatar_url":"https://avatars.githubusercontent.com/u/1013356?v=3","gravatar_id":"","url":"https://api.github.com/users/bwrsandman","html_url":"https://github.com/bwrsandman","followers_url":"https://api.github.com/users/bwrsandman/followers","following_url":"https://api.github.com/users/bwrsandman/following{/other_user}","gists_url":"https://api.github.com/users/bwrsandman/gists{/gist_id}","starred_url":"https://api.github.com/users/bwrsandman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwrsandman/subscriptions","organizations_url":"https://api.github.com/users/bwrsandman/orgs","repos_url":"https://api.github.com/users/bwrsandman/repos","events_url":"https://api.github.com/users/bwrsandman/events{/privacy}","received_events_url":"https://api.github.com/users/bwrsandman/received_events","type":"User","site_admin":false},"body":"Rebase of #94 ","created_at":"2015-06-30T18:50:26Z","updated_at":"2015-07-13T15:19:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6c9bc4f47fd924fbc5a0528b92f796c96a3dc74","assignee":null,"milestone":{"url":"https://api.github.com/repos/OCA/account-financial-tools/milestones/1","html_url":"https://github.com/OCA/account-financial-tools/milestones/8.0","labels_url":"https://api.github.com/repos/OCA/account-financial-tools/milestones/1/labels","id":1042913,"number":1,"title":"8.0","description":null,"creator":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":11,"state":"open","created_at":"2015-03-28T14:00:13Z","updated_at":"2015-07-11T14:29:42Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251/commits","review_comments_url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251/comments","review_comment_url":"https://api.github.com/repos/OCA/account-financial-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/251/comments","statuses_url":"https://api.github.com/repos/OCA/account-financial-tools/statuses/459cc49e513c7fbcd34dce45387c577b596aad9e","head":{"label":"savoirfairelinux:reversal_newapi","ref":"reversal_newapi","sha":"459cc49e513c7fbcd34dce45387c577b596aad9e","user":{"login":"savoirfairelinux","id":2735545,"avatar_url":"https://avatars.githubusercontent.com/u/2735545?v=3","gravatar_id":"","url":"https://api.github.com/users/savoirfairelinux","html_url":"https://github.com/savoirfairelinux","followers_url":"https://api.github.com/users/savoirfairelinux/followers","following_url":"https://api.github.com/users/savoirfairelinux/following{/other_user}","gists_url":"https://api.github.com/users/savoirfairelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/savoirfairelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/savoirfairelinux/subscriptions","organizations_url":"https://api.github.com/users/savoirfairelinux/orgs","repos_url":"https://api.github.com/users/savoirfairelinux/repos","events_url":"https://api.github.com/users/savoirfairelinux/events{/privacy}","received_events_url":"https://api.github.com/users/savoirfairelinux/received_events","type":"Organization","site_admin":false},"repo":{"id":21871349,"name":"account-financial-tools","full_name":"savoirfairelinux/account-financial-tools","owner":{"login":"savoirfairelinux","id":2735545,"avatar_url":"https://avatars.githubusercontent.com/u/2735545?v=3","gravatar_id":"","url":"https://api.github.com/users/savoirfairelinux","html_url":"https://github.com/savoirfairelinux","followers_url":"https://api.github.com/users/savoirfairelinux/followers","following_url":"https://api.github.com/users/savoirfairelinux/following{/other_user}","gists_url":"https://api.github.com/users/savoirfairelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/savoirfairelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/savoirfairelinux/subscriptions","organizations_url":"https://api.github.com/users/savoirfairelinux/orgs","repos_url":"https://api.github.com/users/savoirfairelinux/repos","events_url":"https://api.github.com/users/savoirfairelinux/events{/privacy}","received_events_url":"https://api.github.com/users/savoirfairelinux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/savoirfairelinux/account-financial-tools","description":"","fork":true,"url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools","forks_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/forks","keys_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/teams","hooks_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/hooks","issue_events_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/issues/events{/number}","events_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/events","assignees_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/assignees{/user}","branches_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/branches{/branch}","tags_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/tags","blobs_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/languages","stargazers_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/stargazers","contributors_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/contributors","subscribers_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/subscribers","subscription_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/subscription","commits_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/contents/{+path}","compare_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/merges","archive_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/downloads","issues_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/issues{/number}","pulls_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/labels{/name}","releases_url":"https://api.github.com/repos/savoirfairelinux/account-financial-tools/releases{/id}","created_at":"2014-07-15T18:38:11Z","updated_at":"2014-07-14T09:03:24Z","pushed_at":"2015-07-13T14:19:59Z","git_url":"git://github.com/savoirfairelinux/account-financial-tools.git","ssh_url":"git@github.com:savoirfairelinux/account-financial-tools.git","clone_url":"https://github.com/savoirfairelinux/account-financial-tools.git","svn_url":"https://github.com/savoirfairelinux/account-financial-tools","homepage":null,"size":4292,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"0b51096cfc13836ec051465ed8c92e21cf70c077","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":20881761,"name":"account-financial-tools","full_name":"OCA/account-financial-tools","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/account-financial-tools","description":"Odoo Accountant Financial Tools and Utils","fork":false,"url":"https://api.github.com/repos/OCA/account-financial-tools","forks_url":"https://api.github.com/repos/OCA/account-financial-tools/forks","keys_url":"https://api.github.com/repos/OCA/account-financial-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/account-financial-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/account-financial-tools/teams","hooks_url":"https://api.github.com/repos/OCA/account-financial-tools/hooks","issue_events_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/account-financial-tools/events","assignees_url":"https://api.github.com/repos/OCA/account-financial-tools/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/account-financial-tools/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/account-financial-tools/tags","blobs_url":"https://api.github.com/repos/OCA/account-financial-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/account-financial-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/account-financial-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/account-financial-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/account-financial-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/account-financial-tools/languages","stargazers_url":"https://api.github.com/repos/OCA/account-financial-tools/stargazers","contributors_url":"https://api.github.com/repos/OCA/account-financial-tools/contributors","subscribers_url":"https://api.github.com/repos/OCA/account-financial-tools/subscribers","subscription_url":"https://api.github.com/repos/OCA/account-financial-tools/subscription","commits_url":"https://api.github.com/repos/OCA/account-financial-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/account-financial-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/account-financial-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/account-financial-tools/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/account-financial-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/account-financial-tools/merges","archive_url":"https://api.github.com/repos/OCA/account-financial-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/account-financial-tools/downloads","issues_url":"https://api.github.com/repos/OCA/account-financial-tools/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/account-financial-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/account-financial-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/account-financial-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/account-financial-tools/labels{/name}","releases_url":"https://api.github.com/repos/OCA/account-financial-tools/releases{/id}","created_at":"2014-06-16T10:58:57Z","updated_at":"2015-07-01T11:58:50Z","pushed_at":"2015-07-13T14:20:00Z","git_url":"git://github.com/OCA/account-financial-tools.git","ssh_url":"git@github.com:OCA/account-financial-tools.git","clone_url":"https://github.com/OCA/account-financial-tools.git","svn_url":"https://github.com/OCA/account-financial-tools","homepage":"","size":7812,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"open_issues_count":64,"forks":94,"open_issues":64,"watchers":28,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251"},"html":{"href":"https://github.com/OCA/account-financial-tools/pull/251"},"issue":{"href":"https://api.github.com/repos/OCA/account-financial-tools/issues/251"},"comments":{"href":"https://api.github.com/repos/OCA/account-financial-tools/issues/251/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/account-financial-tools/pulls/251/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/account-financial-tools/statuses/459cc49e513c7fbcd34dce45387c577b596aad9e"}}}}