{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/commission/pulls/comments/214659022","pull_request_review_id":151760806,"id":214659022,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDY1OTAyMg==","diff_hunk":"@@ -47,6 +47,23 @@ def _get_next_period_date(self, agent, current_date):\n         else:\n             raise exceptions.Warning(_(\"Settlement period not valid.\"))\n \n+    def _get_settlement_domain(self, agent, company, sett_from, sett_to):\n+        return [\n+            ('agent', '=', agent.id),\n+            ('date_from', '=', sett_from),\n+            ('date_to', '=', sett_to),\n+            ('company_id', '=', company.id),\n+            ('state', '=', 'settled')\n+        ]\n+\n+    def _get_settlement_values(self, agent, company, sett_from, sett_to):","path":"sale_commission/wizard/wizard_settle.py","position":13,"original_position":13,"commit_id":"f271d461f801a29877b32fd22807fd6070916e18","original_commit_id":"f271d461f801a29877b32fd22807fd6070916e18","user":{"login":"pedrobaeza","id":7165771,"node_id":"MDQ6VXNlcjcxNjU3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/7165771?v=4","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},"body":"Call it for following the same practice as Odoo core, `_prepare_settlement_vals`","created_at":"2018-09-03T11:31:28Z","updated_at":"2018-09-03T11:32:37Z","html_url":"https://github.com/OCA/commission/pull/176#discussion_r214659022","pull_request_url":"https://api.github.com/repos/OCA/commission/pulls/176","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OCA/commission/pulls/comments/214659022"},"html":{"href":"https://github.com/OCA/commission/pull/176#discussion_r214659022"},"pull_request":{"href":"https://api.github.com/repos/OCA/commission/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/commission/pulls/176","id":212716329,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNzE2MzI5","html_url":"https://github.com/OCA/commission/pull/176","diff_url":"https://github.com/OCA/commission/pull/176.diff","patch_url":"https://github.com/OCA/commission/pull/176.patch","issue_url":"https://api.github.com/repos/OCA/commission/issues/176","number":176,"state":"open","locked":false,"title":"[IMP] Add two hooks on make settlements","user":{"login":"etobella","id":28590170,"node_id":"MDQ6VXNlcjI4NTkwMTcw","avatar_url":"https://avatars1.githubusercontent.com/u/28590170?v=4","gravatar_id":"","url":"https://api.github.com/users/etobella","html_url":"https://github.com/etobella","followers_url":"https://api.github.com/users/etobella/followers","following_url":"https://api.github.com/users/etobella/following{/other_user}","gists_url":"https://api.github.com/users/etobella/gists{/gist_id}","starred_url":"https://api.github.com/users/etobella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etobella/subscriptions","organizations_url":"https://api.github.com/users/etobella/orgs","repos_url":"https://api.github.com/users/etobella/repos","events_url":"https://api.github.com/users/etobella/events{/privacy}","received_events_url":"https://api.github.com/users/etobella/received_events","type":"User","site_admin":false},"body":"It only adds two hooks on the creation of settlements.","created_at":"2018-09-03T11:14:05Z","updated_at":"2018-09-03T11:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21aa278a49d781c3f3077b3bda58c9b0b1e4c43b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OCA/commission/pulls/176/commits","review_comments_url":"https://api.github.com/repos/OCA/commission/pulls/176/comments","review_comment_url":"https://api.github.com/repos/OCA/commission/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/commission/issues/176/comments","statuses_url":"https://api.github.com/repos/OCA/commission/statuses/f271d461f801a29877b32fd22807fd6070916e18","head":{"label":"etobella:11.0-add-hooks","ref":"11.0-add-hooks","sha":"f271d461f801a29877b32fd22807fd6070916e18","user":{"login":"etobella","id":28590170,"node_id":"MDQ6VXNlcjI4NTkwMTcw","avatar_url":"https://avatars1.githubusercontent.com/u/28590170?v=4","gravatar_id":"","url":"https://api.github.com/users/etobella","html_url":"https://github.com/etobella","followers_url":"https://api.github.com/users/etobella/followers","following_url":"https://api.github.com/users/etobella/following{/other_user}","gists_url":"https://api.github.com/users/etobella/gists{/gist_id}","starred_url":"https://api.github.com/users/etobella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etobella/subscriptions","organizations_url":"https://api.github.com/users/etobella/orgs","repos_url":"https://api.github.com/users/etobella/repos","events_url":"https://api.github.com/users/etobella/events{/privacy}","received_events_url":"https://api.github.com/users/etobella/received_events","type":"User","site_admin":false},"repo":{"id":107281561,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcyODE1NjE=","name":"commission","full_name":"etobella/commission","owner":{"login":"etobella","id":28590170,"node_id":"MDQ6VXNlcjI4NTkwMTcw","avatar_url":"https://avatars1.githubusercontent.com/u/28590170?v=4","gravatar_id":"","url":"https://api.github.com/users/etobella","html_url":"https://github.com/etobella","followers_url":"https://api.github.com/users/etobella/followers","following_url":"https://api.github.com/users/etobella/following{/other_user}","gists_url":"https://api.github.com/users/etobella/gists{/gist_id}","starred_url":"https://api.github.com/users/etobella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etobella/subscriptions","organizations_url":"https://api.github.com/users/etobella/orgs","repos_url":"https://api.github.com/users/etobella/repos","events_url":"https://api.github.com/users/etobella/events{/privacy}","received_events_url":"https://api.github.com/users/etobella/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/etobella/commission","description":"Odoo Commission Management","fork":true,"url":"https://api.github.com/repos/etobella/commission","forks_url":"https://api.github.com/repos/etobella/commission/forks","keys_url":"https://api.github.com/repos/etobella/commission/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etobella/commission/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etobella/commission/teams","hooks_url":"https://api.github.com/repos/etobella/commission/hooks","issue_events_url":"https://api.github.com/repos/etobella/commission/issues/events{/number}","events_url":"https://api.github.com/repos/etobella/commission/events","assignees_url":"https://api.github.com/repos/etobella/commission/assignees{/user}","branches_url":"https://api.github.com/repos/etobella/commission/branches{/branch}","tags_url":"https://api.github.com/repos/etobella/commission/tags","blobs_url":"https://api.github.com/repos/etobella/commission/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etobella/commission/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etobella/commission/git/refs{/sha}","trees_url":"https://api.github.com/repos/etobella/commission/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etobella/commission/statuses/{sha}","languages_url":"https://api.github.com/repos/etobella/commission/languages","stargazers_url":"https://api.github.com/repos/etobella/commission/stargazers","contributors_url":"https://api.github.com/repos/etobella/commission/contributors","subscribers_url":"https://api.github.com/repos/etobella/commission/subscribers","subscription_url":"https://api.github.com/repos/etobella/commission/subscription","commits_url":"https://api.github.com/repos/etobella/commission/commits{/sha}","git_commits_url":"https://api.github.com/repos/etobella/commission/git/commits{/sha}","comments_url":"https://api.github.com/repos/etobella/commission/comments{/number}","issue_comment_url":"https://api.github.com/repos/etobella/commission/issues/comments{/number}","contents_url":"https://api.github.com/repos/etobella/commission/contents/{+path}","compare_url":"https://api.github.com/repos/etobella/commission/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etobella/commission/merges","archive_url":"https://api.github.com/repos/etobella/commission/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etobella/commission/downloads","issues_url":"https://api.github.com/repos/etobella/commission/issues{/number}","pulls_url":"https://api.github.com/repos/etobella/commission/pulls{/number}","milestones_url":"https://api.github.com/repos/etobella/commission/milestones{/number}","notifications_url":"https://api.github.com/repos/etobella/commission/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etobella/commission/labels{/name}","releases_url":"https://api.github.com/repos/etobella/commission/releases{/id}","deployments_url":"https://api.github.com/repos/etobella/commission/deployments","created_at":"2017-10-17T14:40:19Z","updated_at":"2018-08-30T06:47:26Z","pushed_at":"2018-09-03T11:12:09Z","git_url":"git://github.com/etobella/commission.git","ssh_url":"git@github.com:etobella/commission.git","clone_url":"https://github.com/etobella/commission.git","svn_url":"https://github.com/etobella/commission","homepage":"","size":1077,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"11.0"}},"base":{"label":"OCA:11.0","ref":"11.0","sha":"12664f61f2c6aa57620665217a3bb09604db67b1","user":{"login":"OCA","id":7600578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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":20922238,"node_id":"MDEwOlJlcG9zaXRvcnkyMDkyMjIzOA==","name":"commission","full_name":"OCA/commission","owner":{"login":"OCA","id":7600578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDA1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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/commission","description":"Odoo Commission Management","fork":false,"url":"https://api.github.com/repos/OCA/commission","forks_url":"https://api.github.com/repos/OCA/commission/forks","keys_url":"https://api.github.com/repos/OCA/commission/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/commission/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/commission/teams","hooks_url":"https://api.github.com/repos/OCA/commission/hooks","issue_events_url":"https://api.github.com/repos/OCA/commission/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/commission/events","assignees_url":"https://api.github.com/repos/OCA/commission/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/commission/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/commission/tags","blobs_url":"https://api.github.com/repos/OCA/commission/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/commission/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/commission/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/commission/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/commission/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/commission/languages","stargazers_url":"https://api.github.com/repos/OCA/commission/stargazers","contributors_url":"https://api.github.com/repos/OCA/commission/contributors","subscribers_url":"https://api.github.com/repos/OCA/commission/subscribers","subscription_url":"https://api.github.com/repos/OCA/commission/subscription","commits_url":"https://api.github.com/repos/OCA/commission/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/commission/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/commission/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/commission/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/commission/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/commission/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/commission/merges","archive_url":"https://api.github.com/repos/OCA/commission/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/commission/downloads","issues_url":"https://api.github.com/repos/OCA/commission/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/commission/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/commission/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/commission/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/commission/labels{/name}","releases_url":"https://api.github.com/repos/OCA/commission/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/commission/deployments","created_at":"2014-06-17T12:22:39Z","updated_at":"2018-08-28T14:42:59Z","pushed_at":"2018-09-03T11:14:06Z","git_url":"git://github.com/OCA/commission.git","ssh_url":"git@github.com:OCA/commission.git","clone_url":"https://github.com/OCA/commission.git","svn_url":"https://github.com/OCA/commission","homepage":"","size":1277,"stargazers_count":36,"watchers_count":36,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":146,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":146,"open_issues":26,"watchers":36,"default_branch":"11.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/commission/pulls/176"},"html":{"href":"https://github.com/OCA/commission/pull/176"},"issue":{"href":"https://api.github.com/repos/OCA/commission/issues/176"},"comments":{"href":"https://api.github.com/repos/OCA/commission/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/commission/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/commission/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/commission/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/commission/statuses/f271d461f801a29877b32fd22807fd6070916e18"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pedrobaeza"}}