{"action":"created","comment":{"url":"https://api.github.com/repos/brain-tec/Training/pulls/comments/176163055","pull_request_review_id":105818628,"id":176163055,"diff_hunk":"@@ -0,0 +1,23 @@\n+from odoo import models,fields,_\n+from odoo import api\n+\n+class Wizardo(models.TransientModel):\n+    _name='openacademy.wizard'\n+\n+    # session_relation=fields.Many2one('openacademy.session', default=lambda self: self._context.get('active_id'))\n+    session_relations=fields.Many2many('openacademy.session', 'wizard_session_rel',default=lambda self: self._context.get('active_ids'))\n+    partner_relation=fields.Many2many('res.partner','wizard_partner_rel')\n+\n+    @api.multi\n+    def add2session(self):\n+        #solution with old API\n+        #ids_attendess=[(4, x.id) for x in self.partner_relation]\n+        #self.session_relation.write({'attendees_ids': ids_attendess})\n+        self.session_relation.attendees_ids |= self.partner_relation\n+\n+    def add2sessions(self):\n+        #solution with old API\n+        #ids_attendess=[(4, x.id) for x in self.partner_relation]\n+        #self.session_relation.write({'attendees_ids': ids_attendess})\n+        for each_session in self.session_relations:","path":"openacademy/wizard/wizard.py","position":22,"original_position":22,"commit_id":"9c6d986fd0d85646be8b166f858a836ca9fdd475","original_commit_id":"9c6d986fd0d85646be8b166f858a836ca9fdd475","user":{"login":"BT-rmartin","id":9987218,"avatar_url":"https://avatars0.githubusercontent.com/u/9987218?v=4","gravatar_id":"","url":"https://api.github.com/users/BT-rmartin","html_url":"https://github.com/BT-rmartin","followers_url":"https://api.github.com/users/BT-rmartin/followers","following_url":"https://api.github.com/users/BT-rmartin/following{/other_user}","gists_url":"https://api.github.com/users/BT-rmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/BT-rmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BT-rmartin/subscriptions","organizations_url":"https://api.github.com/users/BT-rmartin/orgs","repos_url":"https://api.github.com/users/BT-rmartin/repos","events_url":"https://api.github.com/users/BT-rmartin/events{/privacy}","received_events_url":"https://api.github.com/users/BT-rmartin/received_events","type":"User","site_admin":false},"body":"Well done! Good example with both APIs","created_at":"2018-03-21T17:07:42Z","updated_at":"2018-03-21T17:07:42Z","html_url":"https://github.com/brain-tec/Training/pull/14#discussion_r176163055","pull_request_url":"https://api.github.com/repos/brain-tec/Training/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/comments/176163055"},"html":{"href":"https://github.com/brain-tec/Training/pull/14#discussion_r176163055"},"pull_request":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/brain-tec/Training/pulls/14","id":175571058,"html_url":"https://github.com/brain-tec/Training/pull/14","diff_url":"https://github.com/brain-tec/Training/pull/14.diff","patch_url":"https://github.com/brain-tec/Training/pull/14.patch","issue_url":"https://api.github.com/repos/brain-tec/Training/issues/14","number":14,"state":"open","locked":false,"title":"11.0.dherreros","user":{"login":"BT-dherreros","id":37086217,"avatar_url":"https://avatars0.githubusercontent.com/u/37086217?v=4","gravatar_id":"","url":"https://api.github.com/users/BT-dherreros","html_url":"https://github.com/BT-dherreros","followers_url":"https://api.github.com/users/BT-dherreros/followers","following_url":"https://api.github.com/users/BT-dherreros/following{/other_user}","gists_url":"https://api.github.com/users/BT-dherreros/gists{/gist_id}","starred_url":"https://api.github.com/users/BT-dherreros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BT-dherreros/subscriptions","organizations_url":"https://api.github.com/users/BT-dherreros/orgs","repos_url":"https://api.github.com/users/BT-dherreros/repos","events_url":"https://api.github.com/users/BT-dherreros/events{/privacy}","received_events_url":"https://api.github.com/users/BT-dherreros/received_events","type":"User","site_admin":false},"body":"First Pull Request","created_at":"2018-03-16T15:44:08Z","updated_at":"2018-03-21T17:07:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d15039b83888d06422bffb25d41df30f4f269894","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/brain-tec/Training/pulls/14/commits","review_comments_url":"https://api.github.com/repos/brain-tec/Training/pulls/14/comments","review_comment_url":"https://api.github.com/repos/brain-tec/Training/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brain-tec/Training/issues/14/comments","statuses_url":"https://api.github.com/repos/brain-tec/Training/statuses/9c6d986fd0d85646be8b166f858a836ca9fdd475","head":{"label":"BT-dherreros:11.0.dherreros","ref":"11.0.dherreros","sha":"9c6d986fd0d85646be8b166f858a836ca9fdd475","user":{"login":"BT-dherreros","id":37086217,"avatar_url":"https://avatars0.githubusercontent.com/u/37086217?v=4","gravatar_id":"","url":"https://api.github.com/users/BT-dherreros","html_url":"https://github.com/BT-dherreros","followers_url":"https://api.github.com/users/BT-dherreros/followers","following_url":"https://api.github.com/users/BT-dherreros/following{/other_user}","gists_url":"https://api.github.com/users/BT-dherreros/gists{/gist_id}","starred_url":"https://api.github.com/users/BT-dherreros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BT-dherreros/subscriptions","organizations_url":"https://api.github.com/users/BT-dherreros/orgs","repos_url":"https://api.github.com/users/BT-dherreros/repos","events_url":"https://api.github.com/users/BT-dherreros/events{/privacy}","received_events_url":"https://api.github.com/users/BT-dherreros/received_events","type":"User","site_admin":false},"repo":{"id":125489487,"name":"Training","full_name":"BT-dherreros/Training","owner":{"login":"BT-dherreros","id":37086217,"avatar_url":"https://avatars0.githubusercontent.com/u/37086217?v=4","gravatar_id":"","url":"https://api.github.com/users/BT-dherreros","html_url":"https://github.com/BT-dherreros","followers_url":"https://api.github.com/users/BT-dherreros/followers","following_url":"https://api.github.com/users/BT-dherreros/following{/other_user}","gists_url":"https://api.github.com/users/BT-dherreros/gists{/gist_id}","starred_url":"https://api.github.com/users/BT-dherreros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BT-dherreros/subscriptions","organizations_url":"https://api.github.com/users/BT-dherreros/orgs","repos_url":"https://api.github.com/users/BT-dherreros/repos","events_url":"https://api.github.com/users/BT-dherreros/events{/privacy}","received_events_url":"https://api.github.com/users/BT-dherreros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BT-dherreros/Training","description":null,"fork":true,"url":"https://api.github.com/repos/BT-dherreros/Training","forks_url":"https://api.github.com/repos/BT-dherreros/Training/forks","keys_url":"https://api.github.com/repos/BT-dherreros/Training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BT-dherreros/Training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BT-dherreros/Training/teams","hooks_url":"https://api.github.com/repos/BT-dherreros/Training/hooks","issue_events_url":"https://api.github.com/repos/BT-dherreros/Training/issues/events{/number}","events_url":"https://api.github.com/repos/BT-dherreros/Training/events","assignees_url":"https://api.github.com/repos/BT-dherreros/Training/assignees{/user}","branches_url":"https://api.github.com/repos/BT-dherreros/Training/branches{/branch}","tags_url":"https://api.github.com/repos/BT-dherreros/Training/tags","blobs_url":"https://api.github.com/repos/BT-dherreros/Training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BT-dherreros/Training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BT-dherreros/Training/git/refs{/sha}","trees_url":"https://api.github.com/repos/BT-dherreros/Training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BT-dherreros/Training/statuses/{sha}","languages_url":"https://api.github.com/repos/BT-dherreros/Training/languages","stargazers_url":"https://api.github.com/repos/BT-dherreros/Training/stargazers","contributors_url":"https://api.github.com/repos/BT-dherreros/Training/contributors","subscribers_url":"https://api.github.com/repos/BT-dherreros/Training/subscribers","subscription_url":"https://api.github.com/repos/BT-dherreros/Training/subscription","commits_url":"https://api.github.com/repos/BT-dherreros/Training/commits{/sha}","git_commits_url":"https://api.github.com/repos/BT-dherreros/Training/git/commits{/sha}","comments_url":"https://api.github.com/repos/BT-dherreros/Training/comments{/number}","issue_comment_url":"https://api.github.com/repos/BT-dherreros/Training/issues/comments{/number}","contents_url":"https://api.github.com/repos/BT-dherreros/Training/contents/{+path}","compare_url":"https://api.github.com/repos/BT-dherreros/Training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BT-dherreros/Training/merges","archive_url":"https://api.github.com/repos/BT-dherreros/Training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BT-dherreros/Training/downloads","issues_url":"https://api.github.com/repos/BT-dherreros/Training/issues{/number}","pulls_url":"https://api.github.com/repos/BT-dherreros/Training/pulls{/number}","milestones_url":"https://api.github.com/repos/BT-dherreros/Training/milestones{/number}","notifications_url":"https://api.github.com/repos/BT-dherreros/Training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BT-dherreros/Training/labels{/name}","releases_url":"https://api.github.com/repos/BT-dherreros/Training/releases{/id}","deployments_url":"https://api.github.com/repos/BT-dherreros/Training/deployments","created_at":"2018-03-16T08:51:10Z","updated_at":"2018-03-16T08:51:12Z","pushed_at":"2018-03-21T16:45:11Z","git_url":"git://github.com/BT-dherreros/Training.git","ssh_url":"git@github.com:BT-dherreros/Training.git","clone_url":"https://github.com/BT-dherreros/Training.git","svn_url":"https://github.com/BT-dherreros/Training","homepage":null,"size":186,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brain-tec:11.0.dherreros","ref":"11.0.dherreros","sha":"06e851e79a8f04af9b2179956a9c63cb95c5dd9f","user":{"login":"brain-tec","id":9976435,"avatar_url":"https://avatars3.githubusercontent.com/u/9976435?v=4","gravatar_id":"","url":"https://api.github.com/users/brain-tec","html_url":"https://github.com/brain-tec","followers_url":"https://api.github.com/users/brain-tec/followers","following_url":"https://api.github.com/users/brain-tec/following{/other_user}","gists_url":"https://api.github.com/users/brain-tec/gists{/gist_id}","starred_url":"https://api.github.com/users/brain-tec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brain-tec/subscriptions","organizations_url":"https://api.github.com/users/brain-tec/orgs","repos_url":"https://api.github.com/users/brain-tec/repos","events_url":"https://api.github.com/users/brain-tec/events{/privacy}","received_events_url":"https://api.github.com/users/brain-tec/received_events","type":"Organization","site_admin":false},"repo":{"id":33656417,"name":"Training","full_name":"brain-tec/Training","owner":{"login":"brain-tec","id":9976435,"avatar_url":"https://avatars3.githubusercontent.com/u/9976435?v=4","gravatar_id":"","url":"https://api.github.com/users/brain-tec","html_url":"https://github.com/brain-tec","followers_url":"https://api.github.com/users/brain-tec/followers","following_url":"https://api.github.com/users/brain-tec/following{/other_user}","gists_url":"https://api.github.com/users/brain-tec/gists{/gist_id}","starred_url":"https://api.github.com/users/brain-tec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brain-tec/subscriptions","organizations_url":"https://api.github.com/users/brain-tec/orgs","repos_url":"https://api.github.com/users/brain-tec/repos","events_url":"https://api.github.com/users/brain-tec/events{/privacy}","received_events_url":"https://api.github.com/users/brain-tec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brain-tec/Training","description":null,"fork":false,"url":"https://api.github.com/repos/brain-tec/Training","forks_url":"https://api.github.com/repos/brain-tec/Training/forks","keys_url":"https://api.github.com/repos/brain-tec/Training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brain-tec/Training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brain-tec/Training/teams","hooks_url":"https://api.github.com/repos/brain-tec/Training/hooks","issue_events_url":"https://api.github.com/repos/brain-tec/Training/issues/events{/number}","events_url":"https://api.github.com/repos/brain-tec/Training/events","assignees_url":"https://api.github.com/repos/brain-tec/Training/assignees{/user}","branches_url":"https://api.github.com/repos/brain-tec/Training/branches{/branch}","tags_url":"https://api.github.com/repos/brain-tec/Training/tags","blobs_url":"https://api.github.com/repos/brain-tec/Training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brain-tec/Training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brain-tec/Training/git/refs{/sha}","trees_url":"https://api.github.com/repos/brain-tec/Training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brain-tec/Training/statuses/{sha}","languages_url":"https://api.github.com/repos/brain-tec/Training/languages","stargazers_url":"https://api.github.com/repos/brain-tec/Training/stargazers","contributors_url":"https://api.github.com/repos/brain-tec/Training/contributors","subscribers_url":"https://api.github.com/repos/brain-tec/Training/subscribers","subscription_url":"https://api.github.com/repos/brain-tec/Training/subscription","commits_url":"https://api.github.com/repos/brain-tec/Training/commits{/sha}","git_commits_url":"https://api.github.com/repos/brain-tec/Training/git/commits{/sha}","comments_url":"https://api.github.com/repos/brain-tec/Training/comments{/number}","issue_comment_url":"https://api.github.com/repos/brain-tec/Training/issues/comments{/number}","contents_url":"https://api.github.com/repos/brain-tec/Training/contents/{+path}","compare_url":"https://api.github.com/repos/brain-tec/Training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brain-tec/Training/merges","archive_url":"https://api.github.com/repos/brain-tec/Training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brain-tec/Training/downloads","issues_url":"https://api.github.com/repos/brain-tec/Training/issues{/number}","pulls_url":"https://api.github.com/repos/brain-tec/Training/pulls{/number}","milestones_url":"https://api.github.com/repos/brain-tec/Training/milestones{/number}","notifications_url":"https://api.github.com/repos/brain-tec/Training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brain-tec/Training/labels{/name}","releases_url":"https://api.github.com/repos/brain-tec/Training/releases{/id}","deployments_url":"https://api.github.com/repos/brain-tec/Training/deployments","created_at":"2015-04-09T08:04:49Z","updated_at":"2016-04-13T06:28:35Z","pushed_at":"2018-03-21T16:45:12Z","git_url":"git://github.com/brain-tec/Training.git","ssh_url":"git@github.com:brain-tec/Training.git","clone_url":"https://github.com/brain-tec/Training.git","svn_url":"https://github.com/brain-tec/Training","homepage":null,"size":181,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":10,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/14"},"html":{"href":"https://github.com/brain-tec/Training/pull/14"},"issue":{"href":"https://api.github.com/repos/brain-tec/Training/issues/14"},"comments":{"href":"https://api.github.com/repos/brain-tec/Training/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brain-tec/Training/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/brain-tec/Training/statuses/9c6d986fd0d85646be8b166f858a836ca9fdd475"}},"author_association":"NONE"}}
{"actor":{"display_login":"BT-rmartin"}}