{"action":"created","comment":{"url":"https://api.github.com/repos/odoo/odoo/pulls/comments/22946789","id":22946789,"diff_hunk":"@@ -0,0 +1,256 @@\n+# -*- coding: utf-8 -*-\n+from openerp import fields, api, models\n+from openerp.osv import osv\n+from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT\n+from openerp.tools.safe_eval import safe_eval\n+from random import randint, shuffle\n+import datetime\n+import logging\n+import math\n+\n+_logger = logging.getLogger(__name__)\n+evaluation_context = {\n+    'datetime': datetime,\n+    'context_today': datetime.datetime.now,\n+}\n+\n+try:\n+    from flanker.addresslib import address\n+\n+    def checkmail(mail):\n+        return bool(address.validate_address(mail))\n+\n+except ImportError:\n+    _logger.warning('Flanker library not found, Flanker features (check email on lead) disabled. \\\n+                     If you plan to use it, please install the Flanker library from http://pypi.python.org/pypi/flanker')\n+\n+    def checkmail(mail):\n+        return True\n+\n+\n+class team_user(models.Model):\n+    _name = 'team.user'\n+\n+    @api.one\n+    def _count_leads(self):\n+        if self.id:\n+            limit_date = datetime.datetime.now() - datetime.timedelta(days=30)\n+            domain = [('user_id', '=', self.user_id.id),\n+                      ('team_id', '=', self.team_id.id),\n+                      ('assign_date', '>', limit_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT))\n+                      ]\n+            self.leads_count = self.env['crm.lead'].search_count(domain)\n+        else:\n+            self.leads_count = 0\n+\n+    @api.one\n+    def _get_percentage(self):\n+        try:\n+            self.percentage_leads = round(100 * self.leads_count / float(self.maximum_user_leads), 2)\n+        except ZeroDivisionError:\n+            self.percentage_leads = 0.0\n+\n+    @api.one\n+    @api.constrains('team_user_domain')\n+    def _assert_valid_domain(self):\n+        try:\n+            domain = safe_eval(self.team_user_domain or '[]', evaluation_context)\n+            self.env['crm.lead'].search(domain)\n+        except Exception:\n+            raise Warning('The domain is incorrectly formatted')\n+\n+    team_id = fields.Many2one('crm.team', string='SaleTeam', required=True, oldname='section_id')\n+    user_id = fields.Many2one('res.users', string='Saleman', required=True)\n+    name = fields.Char(related='user_id.partner_id.display_name')\n+    running = fields.Boolean(string='Running', default=True)\n+    team_user_domain = fields.Char('Domain')\n+    maximum_user_leads = fields.Integer('Leads Per Month')\n+    leads_count = fields.Integer('Assigned Leads', compute='_count_leads', help='Assigned Leads this last month')\n+    percentage_leads = fields.Float(compute='_get_percentage', string='Percentage leads')\n+\n+    @api.one\n+    def toggle_active(self):\n+        self.running = not self.running\n+\n+\n+class crm_team(osv.osv):\n+    _inherit = \"crm.team\"\n+\n+    @api.one\n+    def _count_leads(self):\n+        if self.id:\n+            self.leads_count = self.env['crm.lead'].search_count([('team_id', '=', self.id)])\n+        else:\n+            self.leads_count = 0\n+\n+    @api.one\n+    def _assigned_leads(self):\n+        limit_date = datetime.datetime.now() - datetime.timedelta(days=30)\n+        domain = [('assign_date', '>=', limit_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),\n+                  ('team_id', '=', self.id),\n+                  ('user_id', '!=', False)\n+                  ]\n+        self.assigned_leads = self.env['crm.lead'].search_count(domain)\n+\n+    @api.one\n+    def _unassigned_leads(self):\n+        self.unassigned_leads = self.env['crm.lead'].search_count(\n+            [('team_id', '=', self.id), ('user_id', '=', False), ('assign_date', '=', False)]\n+        )\n+\n+    @api.one\n+    def _capacity(self):\n+        self.capacity = sum(s.maximum_user_leads for s in self.team_user_ids)\n+\n+    @api.one\n+    @api.constrains('score_team_domain')\n+    def _assert_valid_domain(self):\n+        try:\n+            domain = safe_eval(self.score_team_domain or '[]', evaluation_context)\n+            self.env['crm.lead'].search(domain)\n+        except Exception:\n+            raise Warning('The domain is incorrectly formatted')\n+\n+    ratio = fields.Float(string='Ratio')\n+    score_team_domain = fields.Char('Domain')\n+    leads_count = fields.Integer(compute='_count_leads')\n+    assigned_leads = fields.Integer(compute='_assigned_leads')\n+    unassigned_leads = fields.Integer(compute='_unassigned_leads')\n+    capacity = fields.Integer(compute='_capacity')\n+    team_user_ids = fields.One2many('team.user', 'team_id', string='Salesman')\n+    user_ids = fields.Many2many('res.users', 'team_user', 'team_id', 'user_id', readonly=True)  # Use for display in Kanban\n+    min_for_assign = fields.Integer(\"Minimum score\", help=\"Minimum score to be automatically assign (>=)\", default=0, required=True)\n+\n+    @api.model\n+    def direct_assign_leads(self, ids=[]):\n+        ctx = dict(self._context, mail_notify_noemail=True)\n+        self.with_context(ctx)._assign_leads()\n+\n+    @api.model\n+    def dry_assign_leads(self, ids=[]):\n+        self._assign_leads(dry=True)\n+\n+    @api.model\n+    # Note: The dry mode assign only 50 leads per salesteam for speed issues\n+    def assign_leads_to_salesteams(self, all_salesteams, dry=False):\n+        shuffle(all_salesteams)\n+        haslead = True\n+\n+        while haslead:\n+            haslead = False\n+            for salesteam in all_salesteams:\n+                domain = safe_eval(salesteam['score_team_domain'], evaluation_context)\n+                domain.extend([('team_id', '=', False), ('user_id', '=', False)])\n+                domain.extend(['|', ('stage_id.on_change', '=', False), '&', ('stage_id.probability', '!=', 0), ('stage_id.probability', '!=', 100)])\n+                leads = self.env[\"crm.lead\"].search(domain, limit=50)\n+                haslead = haslead or (len(leads) == 50 and not dry)\n+\n+                if not leads.exists():\n+                    return\n+\n+                if dry:\n+                    for lead in leads:\n+                        values = {'lead_id': lead.id, 'team_id': salesteam['id']}\n+                        self.env['leads.dry.run'].create(values)\n+                else:\n+                    leads.write({'team_id': salesteam['id']})\n+\n+                    # Erase fake/false email\n+                    spams = map(lambda x: x.id, filter(lambda x: x.email_from and not checkmail(x.email_from), leads))\n+                    if spams:\n+                        self.env[\"crm.lead\"].browse(spams).write({'email_from': False})\n+\n+                    # Merge duplicated lead\n+                    leads_done = []\n+                    for lead in leads:\n+                        if lead.id not in leads_done:\n+                            leads_duplicated = lead.get_duplicated_leads(False)\n+                            if len(leads_duplicated) > 1:\n+                                self.env[\"crm.lead\"].browse(leads_duplicated).merge_opportunity(False, False)\n+                            leads_done += leads_duplicated\n+                        self._cr.commit()\n+                self._cr.commit()\n+\n+    @api.model\n+    def assign_leads_to_salesmen(self, all_team_users, dry=False):\n+        users = []\n+        for su in all_team_users:\n+            if (su.maximum_user_leads - su.leads_count) <= 0:\n+                continue\n+            domain = safe_eval(su.team_user_domain or '[]', evaluation_context)\n+            domain.append(('user_id', '=', False))\n+            domain.append(('assign_date', '=', False))\n+            domain.append(('score', '>=', su.team_id.min_for_assign))","path":"addons/website_crm_score/models/sales_team.py","position":183,"original_position":183,"commit_id":"864698e41b62069c0d962f3bc64dd2d98b1d8958","original_commit_id":"864698e41b62069c0d962f3bc64dd2d98b1d8958","user":{"login":"xmo-odoo","id":7571158,"avatar_url":"https://avatars.githubusercontent.com/u/7571158?v=3","gravatar_id":"","url":"https://api.github.com/users/xmo-odoo","html_url":"https://github.com/xmo-odoo","followers_url":"https://api.github.com/users/xmo-odoo/followers","following_url":"https://api.github.com/users/xmo-odoo/following{/other_user}","gists_url":"https://api.github.com/users/xmo-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xmo-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmo-odoo/subscriptions","organizations_url":"https://api.github.com/users/xmo-odoo/orgs","repos_url":"https://api.github.com/users/xmo-odoo/repos","events_url":"https://api.github.com/users/xmo-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/xmo-odoo/received_events","type":"User","site_admin":false},"body":"why not extend with a 3-elements list?","created_at":"2015-01-14T16:09:13Z","updated_at":"2015-01-14T16:09:13Z","html_url":"https://github.com/odoo/odoo/pull/4678#discussion_r22946789","pull_request_url":"https://api.github.com/repos/odoo/odoo/pulls/4678","_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments/22946789"},"html":{"href":"https://github.com/odoo/odoo/pull/4678#discussion_r22946789"},"pull_request":{"href":"https://api.github.com/repos/odoo/odoo/pulls/4678"}}},"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/4678","id":27295402,"html_url":"https://github.com/odoo/odoo/pull/4678","diff_url":"https://github.com/odoo/odoo/pull/4678.diff","patch_url":"https://github.com/odoo/odoo/pull/4678.patch","issue_url":"https://api.github.com/repos/odoo/odoo/issues/4678","number":4678,"state":"open","locked":false,"title":"[IMP] website_crm_score: new module","user":{"login":"JKE-be","id":4848797,"avatar_url":"https://avatars.githubusercontent.com/u/4848797?v=3","gravatar_id":"","url":"https://api.github.com/users/JKE-be","html_url":"https://github.com/JKE-be","followers_url":"https://api.github.com/users/JKE-be/followers","following_url":"https://api.github.com/users/JKE-be/following{/other_user}","gists_url":"https://api.github.com/users/JKE-be/gists{/gist_id}","starred_url":"https://api.github.com/users/JKE-be/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKE-be/subscriptions","organizations_url":"https://api.github.com/users/JKE-be/orgs","repos_url":"https://api.github.com/users/JKE-be/repos","events_url":"https://api.github.com/users/JKE-be/events{/privacy}","received_events_url":"https://api.github.com/users/JKE-be/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-13T19:03:15Z","updated_at":"2015-01-14T16:09:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b03c455a6b047cd32478b414b47382ef890345ec","assignee":{"login":"xmo-odoo","id":7571158,"avatar_url":"https://avatars.githubusercontent.com/u/7571158?v=3","gravatar_id":"","url":"https://api.github.com/users/xmo-odoo","html_url":"https://github.com/xmo-odoo","followers_url":"https://api.github.com/users/xmo-odoo/followers","following_url":"https://api.github.com/users/xmo-odoo/following{/other_user}","gists_url":"https://api.github.com/users/xmo-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xmo-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmo-odoo/subscriptions","organizations_url":"https://api.github.com/users/xmo-odoo/orgs","repos_url":"https://api.github.com/users/xmo-odoo/repos","events_url":"https://api.github.com/users/xmo-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/xmo-odoo/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/odoo/odoo/pulls/4678/commits","review_comments_url":"https://api.github.com/repos/odoo/odoo/pulls/4678/comments","review_comment_url":"https://api.github.com/repos/odoo/odoo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/4678/comments","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/864698e41b62069c0d962f3bc64dd2d98b1d8958","head":{"label":"odoo-dev:master-wcs-jke","ref":"master-wcs-jke","sha":"864698e41b62069c0d962f3bc64dd2d98b1d8958","user":{"login":"odoo-dev","id":7466976,"avatar_url":"https://avatars.githubusercontent.com/u/7466976?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo-dev","html_url":"https://github.com/odoo-dev","followers_url":"https://api.github.com/users/odoo-dev/followers","following_url":"https://api.github.com/users/odoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/odoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo-dev/subscriptions","organizations_url":"https://api.github.com/users/odoo-dev/orgs","repos_url":"https://api.github.com/users/odoo-dev/repos","events_url":"https://api.github.com/users/odoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/odoo-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":19853934,"name":"odoo","full_name":"odoo-dev/odoo","owner":{"login":"odoo-dev","id":7466976,"avatar_url":"https://avatars.githubusercontent.com/u/7466976?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo-dev","html_url":"https://github.com/odoo-dev","followers_url":"https://api.github.com/users/odoo-dev/followers","following_url":"https://api.github.com/users/odoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/odoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo-dev/subscriptions","organizations_url":"https://api.github.com/users/odoo-dev/orgs","repos_url":"https://api.github.com/users/odoo-dev/repos","events_url":"https://api.github.com/users/odoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/odoo-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo-dev/odoo","description":"RD Dev Repository","fork":true,"url":"https://api.github.com/repos/odoo-dev/odoo","forks_url":"https://api.github.com/repos/odoo-dev/odoo/forks","keys_url":"https://api.github.com/repos/odoo-dev/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo-dev/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo-dev/odoo/teams","hooks_url":"https://api.github.com/repos/odoo-dev/odoo/hooks","issue_events_url":"https://api.github.com/repos/odoo-dev/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/odoo-dev/odoo/events","assignees_url":"https://api.github.com/repos/odoo-dev/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/odoo-dev/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/odoo-dev/odoo/tags","blobs_url":"https://api.github.com/repos/odoo-dev/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo-dev/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo-dev/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo-dev/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo-dev/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo-dev/odoo/languages","stargazers_url":"https://api.github.com/repos/odoo-dev/odoo/stargazers","contributors_url":"https://api.github.com/repos/odoo-dev/odoo/contributors","subscribers_url":"https://api.github.com/repos/odoo-dev/odoo/subscribers","subscription_url":"https://api.github.com/repos/odoo-dev/odoo/subscription","commits_url":"https://api.github.com/repos/odoo-dev/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo-dev/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo-dev/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo-dev/odoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/odoo-dev/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/odoo-dev/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo-dev/odoo/merges","archive_url":"https://api.github.com/repos/odoo-dev/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo-dev/odoo/downloads","issues_url":"https://api.github.com/repos/odoo-dev/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/odoo-dev/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo-dev/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo-dev/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo-dev/odoo/labels{/name}","releases_url":"https://api.github.com/repos/odoo-dev/odoo/releases{/id}","created_at":"2014-05-16T11:16:19Z","updated_at":"2014-12-16T17:15:21Z","pushed_at":"2015-01-14T16:04:13Z","git_url":"git://github.com/odoo-dev/odoo.git","ssh_url":"git@github.com:odoo-dev/odoo.git","clone_url":"https://github.com/odoo-dev/odoo.git","svn_url":"https://github.com/odoo-dev/odoo","homepage":"https://www.odoo.com","size":1001384,"stargazers_count":37,"watchers_count":37,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":4,"forks":17,"open_issues":4,"watchers":37,"default_branch":"master"}},"base":{"label":"odoo:master","ref":"master","sha":"a290b9d5da61dad07055c83df91064c06d9e31ac","user":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":19745004,"name":"odoo","full_name":"odoo/odoo","owner":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo/odoo","description":"Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.","fork":false,"url":"https://api.github.com/repos/odoo/odoo","forks_url":"https://api.github.com/repos/odoo/odoo/forks","keys_url":"https://api.github.com/repos/odoo/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/odoo/teams","hooks_url":"https://api.github.com/repos/odoo/odoo/hooks","issue_events_url":"https://api.github.com/repos/odoo/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/odoo/events","assignees_url":"https://api.github.com/repos/odoo/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/odoo/tags","blobs_url":"https://api.github.com/repos/odoo/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/odoo/languages","stargazers_url":"https://api.github.com/repos/odoo/odoo/stargazers","contributors_url":"https://api.github.com/repos/odoo/odoo/contributors","subscribers_url":"https://api.github.com/repos/odoo/odoo/subscribers","subscription_url":"https://api.github.com/repos/odoo/odoo/subscription","commits_url":"https://api.github.com/repos/odoo/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/odoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/odoo/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/odoo/merges","archive_url":"https://api.github.com/repos/odoo/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/odoo/downloads","issues_url":"https://api.github.com/repos/odoo/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/odoo/labels{/name}","releases_url":"https://api.github.com/repos/odoo/odoo/releases{/id}","created_at":"2014-05-13T15:38:58Z","updated_at":"2015-01-14T15:06:54Z","pushed_at":"2015-01-14T15:06:52Z","git_url":"git://github.com/odoo/odoo.git","ssh_url":"git@github.com:odoo/odoo.git","clone_url":"https://github.com/odoo/odoo.git","svn_url":"https://github.com/odoo/odoo","homepage":"https://www.odoo.com","size":1002737,"stargazers_count":1805,"watchers_count":1805,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1470,"mirror_url":null,"open_issues_count":1638,"forks":1470,"open_issues":1638,"watchers":1805,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/4678"},"html":{"href":"https://github.com/odoo/odoo/pull/4678"},"issue":{"href":"https://api.github.com/repos/odoo/odoo/issues/4678"},"comments":{"href":"https://api.github.com/repos/odoo/odoo/issues/4678/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/odoo/pulls/4678/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/odoo/odoo/pulls/4678/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/odoo/statuses/864698e41b62069c0d962f3bc64dd2d98b1d8958"}}}}