{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/comments/25689330","id":25689330,"diff_hunk":"@@ -311,72 +315,57 @@ def create(self, vals):\n         )\n         return super(framework_agreement, self).create(vals)\n \n-    @api.multi\n-    def _check_overlap(self):\n-        \"\"\"Constraint to check that no agreements for same product/supplier overlap.\n+    @api.one\n+    @api.constrains('supplier_id', 'product_id', 'start_date', 'end_date',\n+                    'company_id', 'incoterm_id', 'incoterm_address')\n+    def check_overlap(self):\n+        \"\"\"Check that there are no similar agreements at the same time.\n \n-        One agreement per product limit is checked if one_agreement_per_product\n-        is set to True on company\n+        Depending on the  one_agreement_per_product flag on the company,","path":"framework_agreement/model/framework_agreement.py","position":186,"original_position":186,"commit_id":"ebfa406ee38e2ae55b9fd3ef58871a5e88a50045","original_commit_id":"ebfa406ee38e2ae55b9fd3ef58871a5e88a50045","user":{"login":"yvaucher","id":4158438,"avatar_url":"https://avatars.githubusercontent.com/u/4158438?v=3","gravatar_id":"","url":"https://api.github.com/users/yvaucher","html_url":"https://github.com/yvaucher","followers_url":"https://api.github.com/users/yvaucher/followers","following_url":"https://api.github.com/users/yvaucher/following{/other_user}","gists_url":"https://api.github.com/users/yvaucher/gists{/gist_id}","starred_url":"https://api.github.com/users/yvaucher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvaucher/subscriptions","organizations_url":"https://api.github.com/users/yvaucher/orgs","repos_url":"https://api.github.com/users/yvaucher/repos","events_url":"https://api.github.com/users/yvaucher/events{/privacy}","received_events_url":"https://api.github.com/users/yvaucher/received_events","type":"User","site_admin":false},"body":"Extra space before flag name","created_at":"2015-03-03T14:10:50Z","updated_at":"2015-03-03T14:10:50Z","html_url":"https://github.com/OCA/purchase-workflow/pull/101#discussion_r25689330","pull_request_url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/comments/25689330"},"html":{"href":"https://github.com/OCA/purchase-workflow/pull/101#discussion_r25689330"},"pull_request":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101","id":29426366,"html_url":"https://github.com/OCA/purchase-workflow/pull/101","diff_url":"https://github.com/OCA/purchase-workflow/pull/101.diff","patch_url":"https://github.com/OCA/purchase-workflow/pull/101.patch","issue_url":"https://api.github.com/repos/OCA/purchase-workflow/issues/101","number":101,"state":"open","locked":false,"title":"Framework Agreement 2.0","user":{"login":"lepistone","id":1314778,"avatar_url":"https://avatars.githubusercontent.com/u/1314778?v=3","gravatar_id":"","url":"https://api.github.com/users/lepistone","html_url":"https://github.com/lepistone","followers_url":"https://api.github.com/users/lepistone/followers","following_url":"https://api.github.com/users/lepistone/following{/other_user}","gists_url":"https://api.github.com/users/lepistone/gists{/gist_id}","starred_url":"https://api.github.com/users/lepistone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepistone/subscriptions","organizations_url":"https://api.github.com/users/lepistone/orgs","repos_url":"https://api.github.com/users/lepistone/repos","events_url":"https://api.github.com/users/lepistone/events{/privacy}","received_events_url":"https://api.github.com/users/lepistone/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-17T09:00:28Z","updated_at":"2015-03-03T14:10:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8718b6de047d1e5b5e493a7f1ca81dafaf6096bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101/commits","review_comments_url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101/comments","review_comment_url":"https://api.github.com/repos/OCA/purchase-workflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/purchase-workflow/issues/101/comments","statuses_url":"https://api.github.com/repos/OCA/purchase-workflow/statuses/ebfa406ee38e2ae55b9fd3ef58871a5e88a50045","head":{"label":"lepistone:agreement-2.0","ref":"agreement-2.0","sha":"ebfa406ee38e2ae55b9fd3ef58871a5e88a50045","user":{"login":"lepistone","id":1314778,"avatar_url":"https://avatars.githubusercontent.com/u/1314778?v=3","gravatar_id":"","url":"https://api.github.com/users/lepistone","html_url":"https://github.com/lepistone","followers_url":"https://api.github.com/users/lepistone/followers","following_url":"https://api.github.com/users/lepistone/following{/other_user}","gists_url":"https://api.github.com/users/lepistone/gists{/gist_id}","starred_url":"https://api.github.com/users/lepistone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepistone/subscriptions","organizations_url":"https://api.github.com/users/lepistone/orgs","repos_url":"https://api.github.com/users/lepistone/repos","events_url":"https://api.github.com/users/lepistone/events{/privacy}","received_events_url":"https://api.github.com/users/lepistone/received_events","type":"User","site_admin":false},"repo":{"id":24497617,"name":"purchase-workflow","full_name":"lepistone/purchase-workflow","owner":{"login":"lepistone","id":1314778,"avatar_url":"https://avatars.githubusercontent.com/u/1314778?v=3","gravatar_id":"","url":"https://api.github.com/users/lepistone","html_url":"https://github.com/lepistone","followers_url":"https://api.github.com/users/lepistone/followers","following_url":"https://api.github.com/users/lepistone/following{/other_user}","gists_url":"https://api.github.com/users/lepistone/gists{/gist_id}","starred_url":"https://api.github.com/users/lepistone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepistone/subscriptions","organizations_url":"https://api.github.com/users/lepistone/orgs","repos_url":"https://api.github.com/users/lepistone/repos","events_url":"https://api.github.com/users/lepistone/events{/privacy}","received_events_url":"https://api.github.com/users/lepistone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lepistone/purchase-workflow","description":"","fork":true,"url":"https://api.github.com/repos/lepistone/purchase-workflow","forks_url":"https://api.github.com/repos/lepistone/purchase-workflow/forks","keys_url":"https://api.github.com/repos/lepistone/purchase-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lepistone/purchase-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lepistone/purchase-workflow/teams","hooks_url":"https://api.github.com/repos/lepistone/purchase-workflow/hooks","issue_events_url":"https://api.github.com/repos/lepistone/purchase-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/lepistone/purchase-workflow/events","assignees_url":"https://api.github.com/repos/lepistone/purchase-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/lepistone/purchase-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/lepistone/purchase-workflow/tags","blobs_url":"https://api.github.com/repos/lepistone/purchase-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lepistone/purchase-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lepistone/purchase-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/lepistone/purchase-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lepistone/purchase-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/lepistone/purchase-workflow/languages","stargazers_url":"https://api.github.com/repos/lepistone/purchase-workflow/stargazers","contributors_url":"https://api.github.com/repos/lepistone/purchase-workflow/contributors","subscribers_url":"https://api.github.com/repos/lepistone/purchase-workflow/subscribers","subscription_url":"https://api.github.com/repos/lepistone/purchase-workflow/subscription","commits_url":"https://api.github.com/repos/lepistone/purchase-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/lepistone/purchase-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/lepistone/purchase-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/lepistone/purchase-workflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/lepistone/purchase-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/lepistone/purchase-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lepistone/purchase-workflow/merges","archive_url":"https://api.github.com/repos/lepistone/purchase-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lepistone/purchase-workflow/downloads","issues_url":"https://api.github.com/repos/lepistone/purchase-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/lepistone/purchase-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/lepistone/purchase-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/lepistone/purchase-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lepistone/purchase-workflow/labels{/name}","releases_url":"https://api.github.com/repos/lepistone/purchase-workflow/releases{/id}","created_at":"2014-09-26T11:49:40Z","updated_at":"2014-07-14T09:16:21Z","pushed_at":"2015-03-03T13:27:06Z","git_url":"git://github.com/lepistone/purchase-workflow.git","ssh_url":"git@github.com:lepistone/purchase-workflow.git","clone_url":"https://github.com/lepistone/purchase-workflow.git","svn_url":"https://github.com/lepistone/purchase-workflow","homepage":null,"size":2266,"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":"8.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"4d162cd4abd2352df77b017f51820f61c8c696df","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":20882845,"name":"purchase-workflow","full_name":"OCA/purchase-workflow","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/purchase-workflow","description":"","fork":false,"url":"https://api.github.com/repos/OCA/purchase-workflow","forks_url":"https://api.github.com/repos/OCA/purchase-workflow/forks","keys_url":"https://api.github.com/repos/OCA/purchase-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/purchase-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/purchase-workflow/teams","hooks_url":"https://api.github.com/repos/OCA/purchase-workflow/hooks","issue_events_url":"https://api.github.com/repos/OCA/purchase-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/purchase-workflow/events","assignees_url":"https://api.github.com/repos/OCA/purchase-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/purchase-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/purchase-workflow/tags","blobs_url":"https://api.github.com/repos/OCA/purchase-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/purchase-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/purchase-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/purchase-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/purchase-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/purchase-workflow/languages","stargazers_url":"https://api.github.com/repos/OCA/purchase-workflow/stargazers","contributors_url":"https://api.github.com/repos/OCA/purchase-workflow/contributors","subscribers_url":"https://api.github.com/repos/OCA/purchase-workflow/subscribers","subscription_url":"https://api.github.com/repos/OCA/purchase-workflow/subscription","commits_url":"https://api.github.com/repos/OCA/purchase-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/purchase-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/purchase-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/purchase-workflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/purchase-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/purchase-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/purchase-workflow/merges","archive_url":"https://api.github.com/repos/OCA/purchase-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/purchase-workflow/downloads","issues_url":"https://api.github.com/repos/OCA/purchase-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/purchase-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/purchase-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/purchase-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/purchase-workflow/labels{/name}","releases_url":"https://api.github.com/repos/OCA/purchase-workflow/releases{/id}","created_at":"2014-06-16T11:44:14Z","updated_at":"2015-03-03T13:05:28Z","pushed_at":"2015-03-03T13:05:28Z","git_url":"git://github.com/OCA/purchase-workflow.git","ssh_url":"git@github.com:OCA/purchase-workflow.git","clone_url":"https://github.com/OCA/purchase-workflow.git","svn_url":"https://github.com/OCA/purchase-workflow","homepage":null,"size":3033,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":21,"forks":38,"open_issues":21,"watchers":7,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101"},"html":{"href":"https://github.com/OCA/purchase-workflow/pull/101"},"issue":{"href":"https://api.github.com/repos/OCA/purchase-workflow/issues/101"},"comments":{"href":"https://api.github.com/repos/OCA/purchase-workflow/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/purchase-workflow/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/purchase-workflow/statuses/ebfa406ee38e2ae55b9fd3ef58871a5e88a50045"}}}}