{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/hr/pulls/comments/78359392","id":78359392,"diff_hunk":"@@ -0,0 +1,531 @@\n+# -*- coding: utf-8 -*-\n+# Copyright 2016 OpenSynergy Indonesia\n+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).\n+\n+from openerp import models, fields, api\n+from openerp.tools.translate import _\n+from dateutil import relativedelta\n+from datetime import datetime\n+\n+DATE_SELECTION = map(lambda x: [x, str(x)], range(1, 32))\n+\n+\n+class HrLoan(models.Model):\n+    _name = \"hr.loan\"\n+    _description = \"Employee Loan\"\n+    _inherit = [\"mail.thread\"]\n+\n+    @api.multi\n+    @api.depends(\n+        \"payment_schedule_ids\",\n+        \"payment_schedule_ids.principle_amount\",\n+        \"payment_schedule_ids.interest_amount\"\n+    )\n+    def _compute_total(self):\n+        for loan in self:\n+            loan.total_principle_amount = 0.0\n+            loan.total_interest_amount = 0.0\n+            if loan.payment_schedule_ids:\n+                for schedule in loan.payment_schedule_ids:\n+                    loan.total_principle_amount += schedule.principle_amount\n+                    loan.total_interest_amount += schedule.interest_amount\n+\n+    @api.multi\n+    @api.depends(\n+        \"request_date\",\n+        \"date_payment\",\n+        \"realization_date\")\n+    def _compute_first_payment_date(self):\n+        for loan in self:\n+            if not loan.date_payment:\n+                date_payment = 1\n+            else:\n+                date_payment = loan.date_payment\n+\n+            if loan.realization_date:\n+                anchor_date = datetime.strptime(\n+                    loan.date_realization, \"%Y-%m-%d\")\n+            else:\n+                anchor_date = datetime.strptime(loan.request_date, \"%Y-%m-%d\")\n+\n+            loan.first_payment_date = anchor_date + \\\n+                relativedelta.relativedelta(\n+                    day=date_payment, months=+1)\n+\n+    @api.model\n+    def _default_employee_id(self):\n+        criteria = [\n+            (\"user_id\", \"=\", self.env.user.id),\n+        ]\n+        employee = self.env[\"hr.employee\"].search(criteria, limit=1)\n+        return employee\n+\n+    name = fields.Char(\n+        string=\"# Loan\",\n+        required=True,\n+        default=\"/\",\n+        readonly=True,\n+    )\n+    employee_id = fields.Many2one(\n+        string=\"Employee\",\n+        comodel_name=\"hr.employee\",\n+        required=True,\n+        default=_default_employee_id,\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    request_date = fields.Date(\n+        string=\"Request Date\",\n+        required=True,\n+        default=fields.Date.today(),\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    date_realization = fields.Date(\n+        string=\"Realization Date\",\n+        readonly=True,\n+    )\n+    loan_type_id = fields.Many2one(\n+        string=\"Loan Type\",\n+        comodel_name=\"hr.loan.type\",\n+        required=True,\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    currency_id = fields.Many2one(\n+        string=\"Currency\",\n+        related=\"loan_type_id.currency_id\",\n+        store=True,\n+        readonly=True,\n+    )\n+    loan_amount = fields.Float(\n+        string=\"Loan Amount\",\n+        required=True,\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    maximum_loan_amount = fields.Float(\n+        string=\"Maximum Loan Amount\",\n+        related=\"loan_type_id.maximum_loan_amount\",\n+        store=True,\n+        readonly=True,\n+    )\n+    interest = fields.Float(\n+        string=\"Interest (p.a)\",\n+        related=\"loan_type_id.interest_amount\",\n+        store=True,\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    maximum_installment_period = fields.Integer(\n+        string=\"Maximum Installment Period\",\n+        related=\"loan_type_id.maximum_installment_period\",\n+        store=True,\n+        readonly=True,\n+    )\n+    manual_loan_period = fields.Integer(\n+        string=\"Loan Period\",\n+        readonly=True,\n+        states={\n+            \"draft\": [\n+                (\"readonly\", False),\n+            ],\n+        },\n+    )\n+    date_payment = fields.Selection(\n+        string=\"Date Payment\",\n+        selection=DATE_SELECTION,\n+    )\n+    first_payment_date = fields.Date(\n+        string=\"First Payment Date\",\n+        compute=\"_compute_first_payment_date\",\n+        readonly=True,\n+        store=True,\n+    )\n+    total_principle_amount = fields.Float(\n+        string=\"Total Principle Amount\",\n+        compute=\"_compute_total\",\n+        store=True,\n+    )\n+    total_interest_amount = fields.Float(\n+        string=\"Total Interest Amount\",\n+        compute=\"_compute_total\",\n+        store=True,\n+    )\n+    payment_schedule_ids = fields.One2many(\n+        string=\"Payment Schedules\",\n+        comodel_name=\"hr.loan.payment.schedule\",\n+        inverse_name=\"loan_id\",\n+    )\n+    move_id = fields.Many2one(\n+        string=\"Journal Entry\",\n+        comodel_name=\"account.move\",\n+        related=\"statement_line_id.journal_entry_id\",\n+        store=True,\n+    )\n+    statement_line_id = fields.Many2one(\n+        string=\"Statement Line\",\n+        comodel_name=\"account.bank.statement.line\",\n+        readonly=True,\n+        ondelete=\"set null\",\n+    )\n+    statement_id = fields.Many2one(\n+        string=\"# Statement\",\n+        comodel_name=\"account.bank.statement\",\n+        related=\"statement_line_id.statement_id\",\n+        readonly=True,\n+        store=True,\n+    )\n+    confirm_date = fields.Datetime(\n+        string=\"Confirm Date\",\n+        readonly=True,\n+    )\n+    confirm_uid = fields.Many2one(\n+        string=\"Confirm By\",\n+        comodel_name=\"res.users\",\n+        readonly=True,\n+    )\n+    approve_date = fields.Datetime(\n+        string=\"Approve Date\",\n+        readonly=True,\n+    )\n+    approve_uid = fields.Many2one(\n+        string=\"Approve By\",\n+        comodel_name=\"res.users\",\n+        readonly=True,\n+    )\n+    realization_date = fields.Datetime(\n+        string=\"Realization Date\",\n+        readonly=True,\n+    )\n+    realization_uid = fields.Many2one(\n+        string=\"Realized By\",\n+        comodel_name=\"res.users\",\n+        readonly=True,\n+    )\n+    done_date = fields.Date(\n+        string=\"Done Date\",\n+        readonly=True,\n+    )\n+    done_uid = fields.Many2one(\n+        string=\"Done By\",\n+        comodel_name=\"res.users\",\n+        readonly=True,\n+    )\n+    cancel_date = fields.Date(\n+        string=\"Cancel Date\",\n+        readonly=True,\n+    )\n+    cancel_uid = fields.Many2one(\n+        string=\"Cancel By\",\n+        comodel_name=\"res.users\",\n+        readonly=True,\n+    )\n+    manual_realization = fields.Boolean(\n+        string=\"Manual Realization\",\n+    )\n+    state = fields.Selection(\n+        string=\"State\",\n+        selection=[\n+            (\"draft\", \"Draft\"),\n+            (\"confirm\", \"Waiting for Approval\"),\n+            (\"approve\", \"Ready to be Process\"),\n+            (\"active\", \"Active\"),\n+            (\"done\", \"Done\"),\n+            (\"cancel\", \"Cancelled\"),\n+        ],\n+        default=\"draft\",\n+        required=True,\n+        readonly=True,\n+    )\n+\n+    @api.multi\n+    @api.constrains(\"maximum_loan_amount\", \"loan_amount\")\n+    def _check_loan_amount(self):\n+        for loan in self:\n+            if loan.loan_amount <= 0.0:\n+                strWarning = _(\"Loan amount has to be greater than 0\")\n+                raise models.ValidationError(strWarning)\n+\n+            if loan.loan_amount > loan.maximum_loan_amount:\n+                strWarning = _(\"Loan amount exceed maximum loan amount\")\n+                raise models.ValidationError(strWarning)\n+\n+    @api.multi\n+    @api.constrains(\"maximum_installment_period\", \"manual_loan_period\")\n+    def _check_loan_period(self):\n+        for loan in self:\n+            if loan.manual_loan_period <= 0:\n+                strWarning = _(\"Loan period has to be greated than 0\")\n+                raise models.ValidationError(strWarning)\n+            if loan.manual_loan_period > loan.maximum_installment_period:\n+                strWarning = _(\"Loan period exceed maximum installment period\")\n+                raise models.ValidationError(strWarning)\n+\n+    @api.multi\n+    def action_compute_payment(self):\n+        for loan in self:\n+            self._compute_payment()\n+\n+    @api.multi\n+    def _compute_payment(self):\n+        self.ensure_one()\n+        obj_payment = self.env[\"hr.loan.payment.schedule\"]\n+        obj_loan_type = self.env[\"hr.loan.type\"]\n+\n+        self.payment_schedule_ids.unlink()\n+\n+        payment_datas = obj_loan_type._compute_interest(\n+            self.loan_amount,\n+            self.interest,\n+            self.manual_loan_period,\n+            self.first_payment_date,\n+            self.loan_type_id.interest_method)\n+\n+        for payment_data in payment_datas:\n+            payment_data.update({\"loan_id\": self.id})\n+            obj_payment.create(payment_data)\n+\n+    @api.multi\n+    def workflow_action_draft(self):\n+        for loan in self:\n+            data = self._prepare_draft_data()\n+            loan.write(data)\n+\n+    @api.multi\n+    def workflow_action_confirm(self):\n+        for loan in self:\n+            data = self._prepare_confirm_data()\n+            loan.write(data)\n+\n+    @api.multi\n+    def workflow_action_approve(self):\n+        for loan in self:\n+            loan._compute_payment()\n+            data = self._prepare_approve_data()\n+            loan.write(data)\n+\n+    @api.multi\n+    def workflow_action_active(self,\n+                               realization_date=False,\n+                               manual_realization=False):\n+        for loan in self:\n+            data = self._prepare_active_data(\n+                realization_date, manual_realization)\n+            loan.write(data)\n+\n+    @api.multi\n+    def workflow_action_done(self):\n+        for loan in self:\n+            data = self._prepare_done_data()\n+            loan.write(data)\n+\n+    @api.multi\n+    def workflow_action_cancel(self):\n+        for loan in self:\n+            if not self._can_cancel():\n+                strWarning = _(\"Employee loan can only be cancelled on \"\n+                               \"draft, waiting for approval or \"\n+                               \"ready to be process state\")\n+                raise models.ValidationError(strWarning)\n+            data = self._prepare_cancel_data()\n+            loan.write(data)\n+\n+    @api.multi\n+    def _prepare_confirm_data(self):\n+        self.ensure_one()\n+        return {\n+            \"name\": self._create_sequence(),\n+            \"state\": \"confirm\",\n+            \"confirm_date\": fields.datetime.now(),\n+            \"confirm_uid\": self.env.user.id,\n+        }\n+\n+    @api.multi\n+    def _can_cancel(self):\n+        self.ensure_one()\n+        if self.state not in (\"draft\", \"confirm\", \"approve\"):\n+            return False\n+        else:\n+            return True\n+\n+    @api.multi\n+    def _prepare_approve_data(self):\n+        self.ensure_one()\n+        return {\n+            \"state\": \"approve\",\n+            \"approve_date\": fields.datetime.now(),\n+            \"approve_uid\": self.env.user.id,\n+        }\n+\n+    @api.multi\n+    def _prepare_active_data(self,\n+                             realization_date=False,\n+                             manual_realization=False):\n+        self.ensure_one()\n+        if not realization_date:\n+            realization_date = datetime.today().strftime(\"%Y-%m-%d\")\n+        return {\n+            \"state\": \"active\",\n+            \"date_realization\": realization_date,\n+            \"realization_date\": fields.datetime.now(),\n+            \"realization_uid\": self.env.user.id,\n+            \"manual_realization\": manual_realization,\n+        }\n+\n+    @api.multi\n+    def _prepare_done_data(self):\n+        self.ensure_one()\n+        return {\n+            \"state\": \"done\",\n+            \"done_date\": fields.datetime.now(),\n+            \"done_uid\": self.env.user.id,\n+        }\n+\n+    @api.multi\n+    def _prepare_cancel_data(self):\n+        self.ensure_one()\n+        return {\n+            \"state\": \"cancel\",\n+            \"cancel_date\": fields.datetime.now(),\n+            \"cancel_uid\": self.env.user.id,\n+        }\n+\n+    @api.multi\n+    def _create_sequence(self):\n+        self.ensure_one()\n+        if self.name == \"/\":\n+            return self.env[\"ir.sequence\"].get(\"hr.loan\")\n+        else:\n+            return self.name\n+\n+\n+class HrLoanPaymentSchedule(models.Model):\n+    _name = \"hr.loan.payment.schedule\"\n+    _description = \"Loan Payment Schedule\"\n+    _order = \"schedule_date, id\"\n+\n+    @api.multi\n+    @api.depends(\"principle_amount\", \"interest_amount\")\n+    def _compute_installment(self):\n+        for payment in self:\n+            payment.installment_amount = payment.principle_amount + \\\n+                payment.interest_amount\n+\n+    @api.multi\n+    @api.depends(\n+        \"principle_move_line_id\",\n+        \"principle_move_line_id.reconcile_id\",\n+        \"principle_move_line_id.reconcile_partial_id\",\n+        \"interest_move_line_id\",\n+        \"interest_move_line_id.reconcile_id\",\n+        \"interest_move_line_id.reconcile_partial_id\",\n+        )\n+    def _compute_state(self):\n+        for payment in self:\n+            if not payment.principle_move_line_id:\n+                payment.principle_payment_state = \"unpaid\"\n+            elif payment.principle_move_line_id and \\\n+                    not payment.principle_move_line_id.reconcile_partial_id and \\\n+                    not payment.principle_move_line_id.reconcile_id:\n+                payment.principle_payment_state = \"unpaid\"\n+            elif payment.principle_move_line_id.reconcile_partial_id:\n+                payment.principle_payment_state = \"partial\"\n+            elif payment.principle_move_line_id.reconcile_id:\n+                payment.principle_payment_state = \"paid\"\n+\n+            if not payment.interest_move_line_id:\n+                payment.interest_payment_state = \"unpaid\"\n+            elif payment.interest_move_line_id and \\\n+                    not payment.interest_move_line_id.reconcile_partial_id and \\\n+                    not payment.interest_move_line_id.reconcile_id:\n+                payment.interest_payment_state = \"unpaid\"\n+            elif payment.interest_move_line_id.reconcile_partial_id:\n+                payment.interest_payment_state = \"partial\"\n+            elif payment.interest_move_line_id.reconcile_id:\n+                payment.interest_payment_state = \"paid\"","path":"hr_loan/models/hr_loan.py","position":466,"original_position":466,"commit_id":"cc2278f5816b0965607a2c7effe54a3f5abde949","original_commit_id":"cc2278f5816b0965607a2c7effe54a3f5abde949","user":{"login":"dufresnedavid","id":8628981,"avatar_url":"https://avatars.githubusercontent.com/u/8628981?v=3","gravatar_id":"","url":"https://api.github.com/users/dufresnedavid","html_url":"https://github.com/dufresnedavid","followers_url":"https://api.github.com/users/dufresnedavid/followers","following_url":"https://api.github.com/users/dufresnedavid/following{/other_user}","gists_url":"https://api.github.com/users/dufresnedavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dufresnedavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dufresnedavid/subscriptions","organizations_url":"https://api.github.com/users/dufresnedavid/orgs","repos_url":"https://api.github.com/users/dufresnedavid/repos","events_url":"https://api.github.com/users/dufresnedavid/events{/privacy}","received_events_url":"https://api.github.com/users/dufresnedavid/received_events","type":"User","site_admin":false},"body":"this method is very bizare. This will be hard to debug and maintain.","created_at":"2016-09-12T12:04:05Z","updated_at":"2016-09-12T12:04:05Z","html_url":"https://github.com/OCA/hr/pull/253#discussion_r78359392","pull_request_url":"https://api.github.com/repos/OCA/hr/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/OCA/hr/pulls/comments/78359392"},"html":{"href":"https://github.com/OCA/hr/pull/253#discussion_r78359392"},"pull_request":{"href":"https://api.github.com/repos/OCA/hr/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/hr/pulls/253","id":84748195,"html_url":"https://github.com/OCA/hr/pull/253","diff_url":"https://github.com/OCA/hr/pull/253.diff","patch_url":"https://github.com/OCA/hr/pull/253.patch","issue_url":"https://api.github.com/repos/OCA/hr/issues/253","number":253,"state":"open","locked":false,"title":"[WIP][ADD][8.0] Employee Loan","user":{"login":"andhit-r","id":1947376,"avatar_url":"https://avatars.githubusercontent.com/u/1947376?v=3","gravatar_id":"","url":"https://api.github.com/users/andhit-r","html_url":"https://github.com/andhit-r","followers_url":"https://api.github.com/users/andhit-r/followers","following_url":"https://api.github.com/users/andhit-r/following{/other_user}","gists_url":"https://api.github.com/users/andhit-r/gists{/gist_id}","starred_url":"https://api.github.com/users/andhit-r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andhit-r/subscriptions","organizations_url":"https://api.github.com/users/andhit-r/orgs","repos_url":"https://api.github.com/users/andhit-r/repos","events_url":"https://api.github.com/users/andhit-r/events{/privacy}","received_events_url":"https://api.github.com/users/andhit-r/received_events","type":"User","site_admin":false},"body":"TODO:\r\n\r\n- [ ] Loan type\r\n- [ ] Employee Loan\r\n- [x] Import employee loan to bank statement\r\n- [ ] Readme\r\n- [ ] Unittest\r\n- [ ] Squash + rebase","created_at":"2016-09-10T07:47:26Z","updated_at":"2016-09-12T12:04:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"180e460c2bdda6b607ad1a8b68c069e750977656","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OCA/hr/pulls/253/commits","review_comments_url":"https://api.github.com/repos/OCA/hr/pulls/253/comments","review_comment_url":"https://api.github.com/repos/OCA/hr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/hr/issues/253/comments","statuses_url":"https://api.github.com/repos/OCA/hr/statuses/cc2278f5816b0965607a2c7effe54a3f5abde949","head":{"label":"andhit-r:8.0-hr_loan","ref":"8.0-hr_loan","sha":"cc2278f5816b0965607a2c7effe54a3f5abde949","user":{"login":"andhit-r","id":1947376,"avatar_url":"https://avatars.githubusercontent.com/u/1947376?v=3","gravatar_id":"","url":"https://api.github.com/users/andhit-r","html_url":"https://github.com/andhit-r","followers_url":"https://api.github.com/users/andhit-r/followers","following_url":"https://api.github.com/users/andhit-r/following{/other_user}","gists_url":"https://api.github.com/users/andhit-r/gists{/gist_id}","starred_url":"https://api.github.com/users/andhit-r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andhit-r/subscriptions","organizations_url":"https://api.github.com/users/andhit-r/orgs","repos_url":"https://api.github.com/users/andhit-r/repos","events_url":"https://api.github.com/users/andhit-r/events{/privacy}","received_events_url":"https://api.github.com/users/andhit-r/received_events","type":"User","site_admin":false},"repo":{"id":50908184,"name":"hr","full_name":"andhit-r/hr","owner":{"login":"andhit-r","id":1947376,"avatar_url":"https://avatars.githubusercontent.com/u/1947376?v=3","gravatar_id":"","url":"https://api.github.com/users/andhit-r","html_url":"https://github.com/andhit-r","followers_url":"https://api.github.com/users/andhit-r/followers","following_url":"https://api.github.com/users/andhit-r/following{/other_user}","gists_url":"https://api.github.com/users/andhit-r/gists{/gist_id}","starred_url":"https://api.github.com/users/andhit-r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andhit-r/subscriptions","organizations_url":"https://api.github.com/users/andhit-r/orgs","repos_url":"https://api.github.com/users/andhit-r/repos","events_url":"https://api.github.com/users/andhit-r/events{/privacy}","received_events_url":"https://api.github.com/users/andhit-r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andhit-r/hr","description":"Odoo Human Ressources Addons","fork":true,"url":"https://api.github.com/repos/andhit-r/hr","forks_url":"https://api.github.com/repos/andhit-r/hr/forks","keys_url":"https://api.github.com/repos/andhit-r/hr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andhit-r/hr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andhit-r/hr/teams","hooks_url":"https://api.github.com/repos/andhit-r/hr/hooks","issue_events_url":"https://api.github.com/repos/andhit-r/hr/issues/events{/number}","events_url":"https://api.github.com/repos/andhit-r/hr/events","assignees_url":"https://api.github.com/repos/andhit-r/hr/assignees{/user}","branches_url":"https://api.github.com/repos/andhit-r/hr/branches{/branch}","tags_url":"https://api.github.com/repos/andhit-r/hr/tags","blobs_url":"https://api.github.com/repos/andhit-r/hr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andhit-r/hr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andhit-r/hr/git/refs{/sha}","trees_url":"https://api.github.com/repos/andhit-r/hr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andhit-r/hr/statuses/{sha}","languages_url":"https://api.github.com/repos/andhit-r/hr/languages","stargazers_url":"https://api.github.com/repos/andhit-r/hr/stargazers","contributors_url":"https://api.github.com/repos/andhit-r/hr/contributors","subscribers_url":"https://api.github.com/repos/andhit-r/hr/subscribers","subscription_url":"https://api.github.com/repos/andhit-r/hr/subscription","commits_url":"https://api.github.com/repos/andhit-r/hr/commits{/sha}","git_commits_url":"https://api.github.com/repos/andhit-r/hr/git/commits{/sha}","comments_url":"https://api.github.com/repos/andhit-r/hr/comments{/number}","issue_comment_url":"https://api.github.com/repos/andhit-r/hr/issues/comments{/number}","contents_url":"https://api.github.com/repos/andhit-r/hr/contents/{+path}","compare_url":"https://api.github.com/repos/andhit-r/hr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andhit-r/hr/merges","archive_url":"https://api.github.com/repos/andhit-r/hr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andhit-r/hr/downloads","issues_url":"https://api.github.com/repos/andhit-r/hr/issues{/number}","pulls_url":"https://api.github.com/repos/andhit-r/hr/pulls{/number}","milestones_url":"https://api.github.com/repos/andhit-r/hr/milestones{/number}","notifications_url":"https://api.github.com/repos/andhit-r/hr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andhit-r/hr/labels{/name}","releases_url":"https://api.github.com/repos/andhit-r/hr/releases{/id}","deployments_url":"https://api.github.com/repos/andhit-r/hr/deployments","created_at":"2016-02-02T09:10:35Z","updated_at":"2016-02-02T09:10:37Z","pushed_at":"2016-09-11T15:20:38Z","git_url":"git://github.com/andhit-r/hr.git","ssh_url":"git@github.com:andhit-r/hr.git","clone_url":"https://github.com/andhit-r/hr.git","svn_url":"https://github.com/andhit-r/hr","homepage":"","size":4956,"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":"9.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"03f930d49d11be4959cb83b69eb072b3681caec7","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":20891607,"name":"hr","full_name":"OCA/hr","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/hr","description":"Odoo Human Ressources Addons","fork":false,"url":"https://api.github.com/repos/OCA/hr","forks_url":"https://api.github.com/repos/OCA/hr/forks","keys_url":"https://api.github.com/repos/OCA/hr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/hr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/hr/teams","hooks_url":"https://api.github.com/repos/OCA/hr/hooks","issue_events_url":"https://api.github.com/repos/OCA/hr/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/hr/events","assignees_url":"https://api.github.com/repos/OCA/hr/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/hr/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/hr/tags","blobs_url":"https://api.github.com/repos/OCA/hr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/hr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/hr/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/hr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/hr/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/hr/languages","stargazers_url":"https://api.github.com/repos/OCA/hr/stargazers","contributors_url":"https://api.github.com/repos/OCA/hr/contributors","subscribers_url":"https://api.github.com/repos/OCA/hr/subscribers","subscription_url":"https://api.github.com/repos/OCA/hr/subscription","commits_url":"https://api.github.com/repos/OCA/hr/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/hr/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/hr/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/hr/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/hr/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/hr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/hr/merges","archive_url":"https://api.github.com/repos/OCA/hr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/hr/downloads","issues_url":"https://api.github.com/repos/OCA/hr/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/hr/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/hr/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/hr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/hr/labels{/name}","releases_url":"https://api.github.com/repos/OCA/hr/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/hr/deployments","created_at":"2014-06-16T16:15:34Z","updated_at":"2016-09-05T02:52:18Z","pushed_at":"2016-09-11T15:20:39Z","git_url":"git://github.com/OCA/hr.git","ssh_url":"git@github.com:OCA/hr.git","clone_url":"https://github.com/OCA/hr.git","svn_url":"https://github.com/OCA/hr","homepage":"","size":6314,"stargazers_count":31,"watchers_count":31,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":50,"forks":118,"open_issues":50,"watchers":31,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/hr/pulls/253"},"html":{"href":"https://github.com/OCA/hr/pull/253"},"issue":{"href":"https://api.github.com/repos/OCA/hr/issues/253"},"comments":{"href":"https://api.github.com/repos/OCA/hr/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/hr/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/hr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/hr/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/hr/statuses/cc2278f5816b0965607a2c7effe54a3f5abde949"}}}}
{"actor":{"display_login":"dufresnedavid"}}