{"action":"created","comment":{"url":"https://api.github.com/repos/odoo/odoo/pulls/comments/43730174","id":43730174,"diff_hunk":"@@ -0,0 +1,229 @@\n+# -*- coding: utf-8 -*-\n+# Part of Odoo. See LICENSE file for full copyright and licensing details.\n+\n+import logging\n+from odoo import api, fields, models, SUPERUSER_ID, _\n+from odoo.exceptions import UserError\n+\n+_logger = logging.getLogger(__name__)\n+\n+\n+class GamificationBadgeUser(models.Model):\n+    \"\"\"User having received a badge\"\"\"\n+\n+    _name = 'gamification.badge.user'\n+    _description = 'Gamification user badge'\n+    _order = \"create_date desc\"\n+    _rec_name = \"badge_name\"\n+\n+    user_id = fields.Many2one('res.users', string=\"User\", required=True, ondelete=\"cascade\")\n+    sender_id = fields.Many2one('res.users', string=\"Sender\", help=\"The user who has send the badge\")\n+    badge_id = fields.Many2one('gamification.badge', string='Badge', required=True, ondelete=\"cascade\")\n+    challenge_id = fields.Many2one('gamification.challenge', string='Challenge originating', help=\"If this badge was rewarded through a challenge\")\n+    comment = fields.Text()\n+    badge_name = fields.Char(related='badge_id.name')\n+\n+    @api.model\n+    def create(self, vals):\n+        self.env['gamification.badge'].browse(vals.get('badge_id')).check_granting()\n+        return super(GamificationBadgeUser, self).create(vals)\n+\n+    @api.multi\n+    def _send_badge(self):\n+        \"\"\"Send a notification to a user for receiving a badge\n+\n+        Does not verify constrains on badge granting.\n+        The users are added to the owner_ids (create badge_user if needed)\n+        The stats counters are incremented\n+        :param ids: list(int) of badge users that will receive the badge\n+        \"\"\"\n+        res = True\n+        for badge_user in self:\n+            template = self.env.ref('gamification.email_template_badge_received').get_email_template(badge_user.id)\n+            body_html = self.env['mail.template'].with_context(template._context).render_template(template.body_html, 'gamification.badge.user', badge_user.id)\n+            res = badge_user.user_id.message_post(\n+                body=body_html,\n+                subtype='gamification.mt_badge_granted',\n+                partner_ids=[badge_user.user_id.partner_id.id],\n+            )\n+        return res\n+\n+\n+class GamificationBadge(models.Model):\n+    \"\"\"Badge object that users can send and receive\"\"\"\n+\n+    CAN_GRANT = 1\n+    NOBODY_CAN_GRANT = 2\n+    USER_NOT_VIP = 3\n+    BADGE_REQUIRED = 4\n+    TOO_MANY = 5\n+\n+    _name = 'gamification.badge'\n+    _description = 'Gamification badge'\n+    _inherit = 'mail.thread'\n+\n+    name = fields.Char('Badge', required=True, translate=True)\n+    description = fields.Text(translate=True)\n+    image = fields.Binary(attachment=True, help=\"This field holds the image used for the badge, limited to 256x256\")\n+    rule_auth = fields.Selection([\n+        ('everyone', 'Everyone'),\n+        ('users', 'A selected list of users'),\n+        ('having', 'People having some badges'),\n+        ('nobody', 'No one, assigned through challenges')],\n+        string=\"Allowance to Grant\",\n+        help=\"Who can grant this badge\",\n+        required=True, default='everyone')\n+    rule_auth_user_ids = fields.Many2many(\n+        'res.users', 'rel_badge_auth_users',\n+        string='Authorized Users',\n+        help=\"Only these people can give this badge\")\n+    rule_auth_badge_ids = fields.Many2many(\n+        'gamification.badge', 'gamification_badge_rule_badge_rel', 'badge1_id', 'badge2_id',\n+        string='Required Badges',\n+        help=\"Only the people having these badges can give this badge\")\n+\n+    rule_max = fields.Boolean(\n+        string='Monthly Limited Sending', help=\"Check to set a monthly limit per person of sending this badge\")\n+    rule_max_number = fields.Integer(\n+        string='Limitation Number', help=\"The maximum number of time this badge can be sent per month per person.\")\n+    stat_my_monthly_sending = fields.Integer(\n+        compute='_compute_badge_user_stats',\n+        string='My Monthly Sending Total', help=\"The number of time the current user has sent this badge this month.\")\n+    remaining_sending = fields.Integer(\n+        compute='_compute_remaining_sending',\n+        string='Remaining Sending Allowed', help=\"If a maxium is set\")\n+\n+    challenge_ids = fields.One2many(\n+        'gamification.challenge', 'reward_id',\n+        string=\"Reward of Challenges\")\n+\n+    goal_definition_ids = fields.Many2many(\n+        'gamification.goal.definition', 'badge_unlocked_definition_rel',\n+        string='Rewarded by',\n+        help=\"The users that have succeeded theses goals will receive automatically the badge.\")\n+\n+    owner_ids = fields.One2many(\n+        'gamification.badge.user', 'badge_id',\n+        string='Owners', help='The list of instances of this badge granted to users')\n+    active = fields.Boolean(default=True)\n+    unique_owner_ids = fields.Many2many(\n+        'res.users', compute='_compute_owners_info',\n+        string='Unique Owners',\n+        help=\"The list of unique users having received this badge.\")\n+\n+    stat_count = fields.Integer(\n+        compute='_compute_owners_info', string='Total',\n+        help=\"The number of time this badge has been received.\")\n+    stat_count_distinct = fields.Integer(\n+        compute='_compute_owners_info',\n+        string='Number of users', help=\"The number of time this badge has been received by unique users.\")\n+    stat_this_month = fields.Integer(\n+        compute='_compute_badge_user_stats',\n+        string='Monthly total', help=\"The number of time this badge has been received this month.\")\n+    stat_my = fields.Integer(\n+        compute='_compute_badge_user_stats', string='My Total',\n+        help=\"The number of time the current user has received this badge.\")\n+    stat_my_this_month = fields.Integer(\n+        compute='_compute_badge_user_stats',\n+        string='My Monthly Total', help=\"The number of time the current user has received this badge this month.\")\n+\n+    def _compute_badge_user_stats(self):\n+        \"\"\"Return stats related to badge users\"\"\"\n+        BaseUser = self.env['gamification.badge.user']\n+        today = fields.Date.from_string(fields.Date.today())\n+        first_month_day = fields.Date.to_string(today.replace(day=1))\n+        for bid in self:\n+            bid.stat_my = BaseUser.search_count([('badge_id', '=', bid.id), ('user_id', '=', self.env.uid)])\n+            bid.stat_this_month = BaseUser.search_count([('badge_id', '=', bid.id), ('create_date', '>=', first_month_day)])\n+            bid.stat_my_this_month = BaseUser.search_count([('badge_id', '=', bid.id), ('user_id', '=', self.env.uid), ('create_date', '>=', first_month_day)])\n+            bid.stat_my_monthly_sending = BaseUser.search_count([('badge_id', '=', bid.id), ('create_uid', '=', self.env.uid), ('create_date', '>=', first_month_day)])\n+\n+    def _compute_remaining_sending(self):\n+        \"\"\"Computes the number of badges remaining the user can send\n+\n+        0 if not allowed or no remaining\n+        integer if limited sending\n+        -1 if infinite (should not be displayed)\n+        \"\"\"\n+        for badge in self:\n+            if badge._can_grant_badge() != 1:\n+                # if the user cannot grant this badge at all, result is 0\n+                badge.remaining_sending = 0\n+            elif not badge.rule_max:\n+                # if there is no limitation, -1 is returned which means 'infinite'\n+                badge.remaining_sending = -1\n+            else:\n+                badge.remaining_sending = badge.rule_max_number - badge.stat_my_monthly_sending\n+\n+    def _compute_owners_info(self):\n+        \"\"\"Return:\n+            the list of unique res.users ids having received this badge\n+            the total number of time this badge was granted\n+            the total number of users this badge was granted to\n+        \"\"\"\n+        for bid in self:\n+            bid.stat_count = 0\n+            bid.stat_count_distinct = 0\n+            bid.unique_owner_ids = []\n+\n+        self.env.cr.execute(\"\"\"\n+            SELECT badge_id, count(user_id) as stat_count,\n+                count(distinct(user_id)) as stat_count_distinct,\n+                array_agg(distinct(user_id)) as unique_owner_ids\n+            FROM gamification_badge_user\n+            WHERE badge_id in %s\n+            GROUP BY badge_id\n+            \"\"\", (tuple(self.ids),))\n+        for (badge_id, stat_count, stat_count_distinct, unique_owner_ids) in self.env.cr.fetchall():\n+            self.browse(badge_id).stat_count = stat_count\n+            self.browse(badge_id).stat_count_distinct = stat_count_distinct\n+            self.browse(badge_id).unique_owner_ids = unique_owner_ids","path":"addons/gamification/models/gamification_badge.py","position":180,"original_position":180,"commit_id":"dc44331dfc2d896b4da271cb0506e6d3279bed8a","original_commit_id":"dc44331dfc2d896b4da271cb0506e6d3279bed8a","user":{"login":"atp-odoo","id":7599410,"avatar_url":"https://avatars.githubusercontent.com/u/7599410?v=3","gravatar_id":"","url":"https://api.github.com/users/atp-odoo","html_url":"https://github.com/atp-odoo","followers_url":"https://api.github.com/users/atp-odoo/followers","following_url":"https://api.github.com/users/atp-odoo/following{/other_user}","gists_url":"https://api.github.com/users/atp-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/atp-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atp-odoo/subscriptions","organizations_url":"https://api.github.com/users/atp-odoo/orgs","repos_url":"https://api.github.com/users/atp-odoo/repos","events_url":"https://api.github.com/users/atp-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/atp-odoo/received_events","type":"User","site_admin":false},"body":"instead of doing browse three time. do it once and assign variable and use it.. ","created_at":"2015-11-03T09:53:09Z","updated_at":"2015-11-03T09:53:09Z","html_url":"https://github.com/odoo/odoo/pull/8679#discussion_r43730174","pull_request_url":"https://api.github.com/repos/odoo/odoo/pulls/8679","_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments/43730174"},"html":{"href":"https://github.com/odoo/odoo/pull/8679#discussion_r43730174"},"pull_request":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8679"}}},"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/8679","id":45778885,"html_url":"https://github.com/odoo/odoo/pull/8679","diff_url":"https://github.com/odoo/odoo/pull/8679.diff","patch_url":"https://github.com/odoo/odoo/pull/8679.patch","issue_url":"https://api.github.com/repos/odoo/odoo/issues/8679","number":8679,"state":"open","locked":false,"title":"Master gamification newapi htr","user":{"login":"htr-odoo","id":7599690,"avatar_url":"https://avatars.githubusercontent.com/u/7599690?v=3","gravatar_id":"","url":"https://api.github.com/users/htr-odoo","html_url":"https://github.com/htr-odoo","followers_url":"https://api.github.com/users/htr-odoo/followers","following_url":"https://api.github.com/users/htr-odoo/following{/other_user}","gists_url":"https://api.github.com/users/htr-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/htr-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htr-odoo/subscriptions","organizations_url":"https://api.github.com/users/htr-odoo/orgs","repos_url":"https://api.github.com/users/htr-odoo/repos","events_url":"https://api.github.com/users/htr-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/htr-odoo/received_events","type":"User","site_admin":false},"body":"- Task : https://www.odoo.com/web#id=13555&view_type=form&model=project.task&menu_id=3942&action=327\r\n\r\n- Pad : https://pad.odoo.com/p/r.1gGz9YTcVnFCNAhN","created_at":"2015-09-23T13:31:51Z","updated_at":"2015-11-03T09:53:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a330dc4f9e44fc47e52665884027be3f25cdf70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoo/odoo/pulls/8679/commits","review_comments_url":"https://api.github.com/repos/odoo/odoo/pulls/8679/comments","review_comment_url":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/8679/comments","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/dc44331dfc2d896b4da271cb0506e6d3279bed8a","head":{"label":"odoo-dev:master-gamification-newapi-htr","ref":"master-gamification-newapi-htr","sha":"dc44331dfc2d896b4da271cb0506e6d3279bed8a","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":"2015-10-13T05:17:28Z","pushed_at":"2015-11-03T09:46:20Z","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":1479496,"stargazers_count":62,"watchers_count":62,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":0,"forks":25,"open_issues":0,"watchers":62,"default_branch":"master"}},"base":{"label":"odoo:master","ref":"master","sha":"ddfbb690fbc29552c82aed5e8bcf364163d282de","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-11-03T09:14:00Z","pushed_at":"2015-11-03T09:32:24Z","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":1648583,"stargazers_count":3330,"watchers_count":3330,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2969,"mirror_url":null,"open_issues_count":2736,"forks":2969,"open_issues":2736,"watchers":3330,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8679"},"html":{"href":"https://github.com/odoo/odoo/pull/8679"},"issue":{"href":"https://api.github.com/repos/odoo/odoo/issues/8679"},"comments":{"href":"https://api.github.com/repos/odoo/odoo/issues/8679/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8679/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8679/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/odoo/statuses/dc44331dfc2d896b4da271cb0506e6d3279bed8a"}}}}