{"action":"created","comment":{"url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/comments/31319738","id":31319738,"diff_hunk":"@@ -0,0 +1,54 @@\n+# -*- encoding: utf-8 -*-\r\n+##############################################################################\r\n+#\r\n+#    Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)\r\n+#    Releasing children from poverty in Jesus' name\r\n+#    @author: Steve Ferry\r\n+#\r\n+#    The licence is in the file __openerp__.py\r\n+#\r\n+##############################################################################\r\n+from openerp.osv import orm\r\n+\r\n+\r\n+class ResPartnerBank(orm.Model):\r\n+    \"\"\" This class upgrade the partners.bank to match Compassion needs.\r\n+    \"\"\"\r\n+\r\n+    _inherit = 'res.partner.bank'\r\n+\r\n+    def create(self, cr, uid, data, context):\r\n+        \"\"\"Override function to notify creation in a message\r\n+        \"\"\"\r\n+        obj_partner = self.pool['res.partner']\r\n+        part = obj_partner.browse(cr, uid, data['partner_id'], context=context)\r\n+        part.pool.get('mail.thread').message_post(cr, uid, part.id,\r\n+                                                  \"<b>Account number: </b>\" +\r","path":"partner_compassion/model/partner_bank_compassion.py","position":26,"original_position":26,"commit_id":"f322b3eb0e263f6bca7e18c65047ea97c2d1be69","original_commit_id":"f322b3eb0e263f6bca7e18c65047ea97c2d1be69","user":{"login":"ecino","id":8435180,"avatar_url":"https://avatars.githubusercontent.com/u/8435180?v=3","gravatar_id":"","url":"https://api.github.com/users/ecino","html_url":"https://github.com/ecino","followers_url":"https://api.github.com/users/ecino/followers","following_url":"https://api.github.com/users/ecino/following{/other_user}","gists_url":"https://api.github.com/users/ecino/gists{/gist_id}","starred_url":"https://api.github.com/users/ecino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecino/subscriptions","organizations_url":"https://api.github.com/users/ecino/orgs","repos_url":"https://api.github.com/users/ecino/repos","events_url":"https://api.github.com/users/ecino/events{/privacy}","received_events_url":"https://api.github.com/users/ecino/received_events","type":"User","site_admin":false},"body":"To avoid having many lines of code, you can return rewrite like this:\r\n```\r\nmessage_post(\r\n    cr, uid, part.id, \"...\",\r\n    context={...})```","created_at":"2015-05-29T12:26:11Z","updated_at":"2015-05-29T12:26:11Z","html_url":"https://github.com/CompassionCH/compassion-modules/pull/86#discussion_r31319738","pull_request_url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/comments/31319738"},"html":{"href":"https://github.com/CompassionCH/compassion-modules/pull/86#discussion_r31319738"},"pull_request":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86","id":36497796,"html_url":"https://github.com/CompassionCH/compassion-modules/pull/86","diff_url":"https://github.com/CompassionCH/compassion-modules/pull/86.diff","patch_url":"https://github.com/CompassionCH/compassion-modules/pull/86.patch","issue_url":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/86","number":86,"state":"open","locked":false,"title":"1.5 devel","user":{"login":"steveferry","id":6231186,"avatar_url":"https://avatars.githubusercontent.com/u/6231186?v=3","gravatar_id":"","url":"https://api.github.com/users/steveferry","html_url":"https://github.com/steveferry","followers_url":"https://api.github.com/users/steveferry/followers","following_url":"https://api.github.com/users/steveferry/following{/other_user}","gists_url":"https://api.github.com/users/steveferry/gists{/gist_id}","starred_url":"https://api.github.com/users/steveferry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveferry/subscriptions","organizations_url":"https://api.github.com/users/steveferry/orgs","repos_url":"https://api.github.com/users/steveferry/repos","events_url":"https://api.github.com/users/steveferry/events{/privacy}","received_events_url":"https://api.github.com/users/steveferry/received_events","type":"User","site_admin":false},"body":"Following features added:\r\n- Source model name in generated invoices\r\n- Bank account and mandate tracking\r\n- Date end for delegate\r\n- Cron used to check delegate date expiration or beginning","created_at":"2015-05-29T11:48:53Z","updated_at":"2015-05-29T12:26:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"063e94953934a30e67cd9c31dea7c2c1e6460b91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86/commits","review_comments_url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86/comments","review_comment_url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/86/comments","statuses_url":"https://api.github.com/repos/CompassionCH/compassion-modules/statuses/f322b3eb0e263f6bca7e18c65047ea97c2d1be69","head":{"label":"steveferry:1.5-devel","ref":"1.5-devel","sha":"f322b3eb0e263f6bca7e18c65047ea97c2d1be69","user":{"login":"steveferry","id":6231186,"avatar_url":"https://avatars.githubusercontent.com/u/6231186?v=3","gravatar_id":"","url":"https://api.github.com/users/steveferry","html_url":"https://github.com/steveferry","followers_url":"https://api.github.com/users/steveferry/followers","following_url":"https://api.github.com/users/steveferry/following{/other_user}","gists_url":"https://api.github.com/users/steveferry/gists{/gist_id}","starred_url":"https://api.github.com/users/steveferry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveferry/subscriptions","organizations_url":"https://api.github.com/users/steveferry/orgs","repos_url":"https://api.github.com/users/steveferry/repos","events_url":"https://api.github.com/users/steveferry/events{/privacy}","received_events_url":"https://api.github.com/users/steveferry/received_events","type":"User","site_admin":false},"repo":{"id":36277980,"name":"compassion-modules","full_name":"steveferry/compassion-modules","owner":{"login":"steveferry","id":6231186,"avatar_url":"https://avatars.githubusercontent.com/u/6231186?v=3","gravatar_id":"","url":"https://api.github.com/users/steveferry","html_url":"https://github.com/steveferry","followers_url":"https://api.github.com/users/steveferry/followers","following_url":"https://api.github.com/users/steveferry/following{/other_user}","gists_url":"https://api.github.com/users/steveferry/gists{/gist_id}","starred_url":"https://api.github.com/users/steveferry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveferry/subscriptions","organizations_url":"https://api.github.com/users/steveferry/orgs","repos_url":"https://api.github.com/users/steveferry/repos","events_url":"https://api.github.com/users/steveferry/events{/privacy}","received_events_url":"https://api.github.com/users/steveferry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/steveferry/compassion-modules","description":"Odoo modules for Compassion","fork":true,"url":"https://api.github.com/repos/steveferry/compassion-modules","forks_url":"https://api.github.com/repos/steveferry/compassion-modules/forks","keys_url":"https://api.github.com/repos/steveferry/compassion-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steveferry/compassion-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steveferry/compassion-modules/teams","hooks_url":"https://api.github.com/repos/steveferry/compassion-modules/hooks","issue_events_url":"https://api.github.com/repos/steveferry/compassion-modules/issues/events{/number}","events_url":"https://api.github.com/repos/steveferry/compassion-modules/events","assignees_url":"https://api.github.com/repos/steveferry/compassion-modules/assignees{/user}","branches_url":"https://api.github.com/repos/steveferry/compassion-modules/branches{/branch}","tags_url":"https://api.github.com/repos/steveferry/compassion-modules/tags","blobs_url":"https://api.github.com/repos/steveferry/compassion-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steveferry/compassion-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steveferry/compassion-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/steveferry/compassion-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steveferry/compassion-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/steveferry/compassion-modules/languages","stargazers_url":"https://api.github.com/repos/steveferry/compassion-modules/stargazers","contributors_url":"https://api.github.com/repos/steveferry/compassion-modules/contributors","subscribers_url":"https://api.github.com/repos/steveferry/compassion-modules/subscribers","subscription_url":"https://api.github.com/repos/steveferry/compassion-modules/subscription","commits_url":"https://api.github.com/repos/steveferry/compassion-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/steveferry/compassion-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/steveferry/compassion-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/steveferry/compassion-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/steveferry/compassion-modules/contents/{+path}","compare_url":"https://api.github.com/repos/steveferry/compassion-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steveferry/compassion-modules/merges","archive_url":"https://api.github.com/repos/steveferry/compassion-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steveferry/compassion-modules/downloads","issues_url":"https://api.github.com/repos/steveferry/compassion-modules/issues{/number}","pulls_url":"https://api.github.com/repos/steveferry/compassion-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/steveferry/compassion-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/steveferry/compassion-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steveferry/compassion-modules/labels{/name}","releases_url":"https://api.github.com/repos/steveferry/compassion-modules/releases{/id}","created_at":"2015-05-26T06:57:55Z","updated_at":"2015-05-26T06:57:55Z","pushed_at":"2015-05-29T11:43:40Z","git_url":"git://github.com/steveferry/compassion-modules.git","ssh_url":"git@github.com:steveferry/compassion-modules.git","clone_url":"https://github.com/steveferry/compassion-modules.git","svn_url":"https://github.com/steveferry/compassion-modules","homepage":"","size":2162,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"CompassionCH:1.5-devel","ref":"1.5-devel","sha":"f17ec10d7c6149194eaefad65058b90d7532023b","user":{"login":"CompassionCH","id":8435213,"avatar_url":"https://avatars.githubusercontent.com/u/8435213?v=3","gravatar_id":"","url":"https://api.github.com/users/CompassionCH","html_url":"https://github.com/CompassionCH","followers_url":"https://api.github.com/users/CompassionCH/followers","following_url":"https://api.github.com/users/CompassionCH/following{/other_user}","gists_url":"https://api.github.com/users/CompassionCH/gists{/gist_id}","starred_url":"https://api.github.com/users/CompassionCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompassionCH/subscriptions","organizations_url":"https://api.github.com/users/CompassionCH/orgs","repos_url":"https://api.github.com/users/CompassionCH/repos","events_url":"https://api.github.com/users/CompassionCH/events{/privacy}","received_events_url":"https://api.github.com/users/CompassionCH/received_events","type":"Organization","site_admin":false},"repo":{"id":23073482,"name":"compassion-modules","full_name":"CompassionCH/compassion-modules","owner":{"login":"CompassionCH","id":8435213,"avatar_url":"https://avatars.githubusercontent.com/u/8435213?v=3","gravatar_id":"","url":"https://api.github.com/users/CompassionCH","html_url":"https://github.com/CompassionCH","followers_url":"https://api.github.com/users/CompassionCH/followers","following_url":"https://api.github.com/users/CompassionCH/following{/other_user}","gists_url":"https://api.github.com/users/CompassionCH/gists{/gist_id}","starred_url":"https://api.github.com/users/CompassionCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompassionCH/subscriptions","organizations_url":"https://api.github.com/users/CompassionCH/orgs","repos_url":"https://api.github.com/users/CompassionCH/repos","events_url":"https://api.github.com/users/CompassionCH/events{/privacy}","received_events_url":"https://api.github.com/users/CompassionCH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CompassionCH/compassion-modules","description":"Odoo modules for Compassion","fork":false,"url":"https://api.github.com/repos/CompassionCH/compassion-modules","forks_url":"https://api.github.com/repos/CompassionCH/compassion-modules/forks","keys_url":"https://api.github.com/repos/CompassionCH/compassion-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CompassionCH/compassion-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CompassionCH/compassion-modules/teams","hooks_url":"https://api.github.com/repos/CompassionCH/compassion-modules/hooks","issue_events_url":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/events{/number}","events_url":"https://api.github.com/repos/CompassionCH/compassion-modules/events","assignees_url":"https://api.github.com/repos/CompassionCH/compassion-modules/assignees{/user}","branches_url":"https://api.github.com/repos/CompassionCH/compassion-modules/branches{/branch}","tags_url":"https://api.github.com/repos/CompassionCH/compassion-modules/tags","blobs_url":"https://api.github.com/repos/CompassionCH/compassion-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CompassionCH/compassion-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CompassionCH/compassion-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/CompassionCH/compassion-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CompassionCH/compassion-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/CompassionCH/compassion-modules/languages","stargazers_url":"https://api.github.com/repos/CompassionCH/compassion-modules/stargazers","contributors_url":"https://api.github.com/repos/CompassionCH/compassion-modules/contributors","subscribers_url":"https://api.github.com/repos/CompassionCH/compassion-modules/subscribers","subscription_url":"https://api.github.com/repos/CompassionCH/compassion-modules/subscription","commits_url":"https://api.github.com/repos/CompassionCH/compassion-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/CompassionCH/compassion-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/CompassionCH/compassion-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/CompassionCH/compassion-modules/contents/{+path}","compare_url":"https://api.github.com/repos/CompassionCH/compassion-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CompassionCH/compassion-modules/merges","archive_url":"https://api.github.com/repos/CompassionCH/compassion-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CompassionCH/compassion-modules/downloads","issues_url":"https://api.github.com/repos/CompassionCH/compassion-modules/issues{/number}","pulls_url":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/CompassionCH/compassion-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/CompassionCH/compassion-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CompassionCH/compassion-modules/labels{/name}","releases_url":"https://api.github.com/repos/CompassionCH/compassion-modules/releases{/id}","created_at":"2014-08-18T14:08:09Z","updated_at":"2015-05-08T09:31:58Z","pushed_at":"2015-05-29T11:48:54Z","git_url":"git://github.com/CompassionCH/compassion-modules.git","ssh_url":"git@github.com:CompassionCH/compassion-modules.git","clone_url":"https://github.com/CompassionCH/compassion-modules.git","svn_url":"https://github.com/CompassionCH/compassion-modules","homepage":"","size":5718,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86"},"html":{"href":"https://github.com/CompassionCH/compassion-modules/pull/86"},"issue":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/86"},"comments":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/CompassionCH/compassion-modules/statuses/f322b3eb0e263f6bca7e18c65047ea97c2d1be69"}}}}