{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/comments/111209612","pull_request_review_id":32437072,"id":111209612,"diff_hunk":"@@ -0,0 +1,121 @@\n+# -*- coding: utf-8 -*-\n+# Copyright 2017 LasLabs Inc.\n+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).\n+\n+from odoo import api, fields, models\n+\n+\n+class StockPickupRequest(models.Model):\n+    _name = 'stock.pickup.request'\n+    _description = 'Stock Pickup Request'\n+\n+    name = fields.Char(\n+        string='Pickup Name',\n+        default=lambda x: x._default_name(),\n+    )\n+    company_id = fields.Many2one(\n+        string='Responsible Company',\n+        comodel_name='res.company',\n+        required=True,\n+    )\n+    cash_on_delivery = fields.Boolean(\n+        string='Cash On Delivery',\n+        default=0,\n+    )\n+    state = fields.Selection(\n+        selection=[\n+            ('new', 'New'),\n+            ('confirmed', 'Confirmed'),\n+            ('complete', 'Completed')\n+        ],\n+        compute='_compute_state',\n+        store=True,\n+    )\n+    picking_id = fields.Many2one(\n+        string='Source Picking',\n+        comodel_name='stock.picking',\n+        required=True,\n+    )\n+    in_picking = fields.Many2one(\n+        string='Inbound Buyer Picking',\n+        comodel_name='stock.picking',\n+    )\n+    out_picking = fields.Many2one(\n+        string='Carrier Pickup Picking',\n+        comodel_name='stock.picking',\n+    )\n+    cash_in_picking = fields.Many2one(\n+        string='Cash Picking From Buyer Picking',\n+        comodel_name='stock.picking',\n+    )\n+    cash_out_picking = fields.Many2one(\n+        string='Cash Delivery From Carrier Picking',\n+        comodel_name='stock.picking',\n+    )\n+\n+    @api.depends('in_picking.state', 'out_picking.state')\n+    def _compute_state(self):\n+        \"\"\" It will compute the status of the pickup based on the delivery\n+         pickings \"\"\"\n+        state = 'new'\n+        if self.in_picking.state == 'confirmed' and self.out_picking.state == \\","path":"delivery_internal/models/stock_pickup_request.py","position":61,"original_position":61,"commit_id":"e075e7d3e76570bb240a15d5da8fdcff14ff47e1","original_commit_id":"e075e7d3e76570bb240a15d5da8fdcff14ff47e1","user":{"login":"lasley","id":7397578,"avatar_url":"https://avatars0.githubusercontent.com/u/7397578?v=3","gravatar_id":"","url":"https://api.github.com/users/lasley","html_url":"https://github.com/lasley","followers_url":"https://api.github.com/users/lasley/followers","following_url":"https://api.github.com/users/lasley/following{/other_user}","gists_url":"https://api.github.com/users/lasley/gists{/gist_id}","starred_url":"https://api.github.com/users/lasley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasley/subscriptions","organizations_url":"https://api.github.com/users/lasley/orgs","repos_url":"https://api.github.com/users/lasley/repos","events_url":"https://api.github.com/users/lasley/events{/privacy}","received_events_url":"https://api.github.com/users/lasley/received_events","type":"User","site_admin":false},"body":"Expects singleton","created_at":"2017-04-12T17:18:30Z","updated_at":"2017-04-12T17:34:10Z","html_url":"https://github.com/OCA/stock-logistics-workflow/pull/323#discussion_r111209612","pull_request_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323","_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/comments/111209612"},"html":{"href":"https://github.com/OCA/stock-logistics-workflow/pull/323#discussion_r111209612"},"pull_request":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323","id":115450445,"html_url":"https://github.com/OCA/stock-logistics-workflow/pull/323","diff_url":"https://github.com/OCA/stock-logistics-workflow/pull/323.diff","patch_url":"https://github.com/OCA/stock-logistics-workflow/pull/323.patch","issue_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/323","number":323,"state":"open","locked":false,"title":"[WIP][10.0][ADD] delivery_internal: Create Delivery Internal Module","user":{"login":"tedsalmon","id":4956562,"avatar_url":"https://avatars2.githubusercontent.com/u/4956562?v=3","gravatar_id":"","url":"https://api.github.com/users/tedsalmon","html_url":"https://github.com/tedsalmon","followers_url":"https://api.github.com/users/tedsalmon/followers","following_url":"https://api.github.com/users/tedsalmon/following{/other_user}","gists_url":"https://api.github.com/users/tedsalmon/gists{/gist_id}","starred_url":"https://api.github.com/users/tedsalmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedsalmon/subscriptions","organizations_url":"https://api.github.com/users/tedsalmon/orgs","repos_url":"https://api.github.com/users/tedsalmon/repos","events_url":"https://api.github.com/users/tedsalmon/events{/privacy}","received_events_url":"https://api.github.com/users/tedsalmon/received_events","type":"User","site_admin":false},"body":"This PR takes care of the following RFC. https://github.com/OCA/stock-logistics-workflow/issues/304\r\n\r\nIt's currently still WIP.\r\n\r\nThis module adds the concept of an internal delivery carrier to `delivery\r\n.carrier`. When the `delivery_type` of a carrier is set to `Internal`, any\r\npickings shipped from that carrier will create `Requests For Pickup`. These\r\nrequests for pickup will in-turn create two pickings, one for the carrier to\r\n pick up and one for the buyer to receive.\r\n\r\nThe Requests for pickup can also be configured to allow for Cash On\r\nDelivery. Choosing this method will create two more pickings for the cash\r\npickup and subsequent delivery.\r\n\r\n@lasley - Could you please double check that this takes care of all the RFC asks? I am still having issues with an `api.depends`, which is why the tests are failing.","created_at":"2017-04-12T02:05:27Z","updated_at":"2017-04-12T17:34:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"472473acec36474fbf4e423a49ac1f59f21d1f0c","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OCA/stock-logistics-workflow/milestones/4","html_url":"https://github.com/OCA/stock-logistics-workflow/milestone/4","labels_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/milestones/4/labels","id":2052396,"number":4,"title":"10.0","description":null,"creator":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars1.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2016-10-06T14:10:04Z","updated_at":"2017-04-12T15:57:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323/commits","review_comments_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323/comments","review_comment_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/323/comments","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/statuses/e075e7d3e76570bb240a15d5da8fdcff14ff47e1","head":{"label":"LasLabs:feature/10.0/LABS-406-create-delivery_internal","ref":"feature/10.0/LABS-406-create-delivery_internal","sha":"e075e7d3e76570bb240a15d5da8fdcff14ff47e1","user":{"login":"LasLabs","id":13024740,"avatar_url":"https://avatars1.githubusercontent.com/u/13024740?v=3","gravatar_id":"","url":"https://api.github.com/users/LasLabs","html_url":"https://github.com/LasLabs","followers_url":"https://api.github.com/users/LasLabs/followers","following_url":"https://api.github.com/users/LasLabs/following{/other_user}","gists_url":"https://api.github.com/users/LasLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/LasLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LasLabs/subscriptions","organizations_url":"https://api.github.com/users/LasLabs/orgs","repos_url":"https://api.github.com/users/LasLabs/repos","events_url":"https://api.github.com/users/LasLabs/events{/privacy}","received_events_url":"https://api.github.com/users/LasLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":60886854,"name":"stock-logistics-workflow","full_name":"LasLabs/stock-logistics-workflow","owner":{"login":"LasLabs","id":13024740,"avatar_url":"https://avatars1.githubusercontent.com/u/13024740?v=3","gravatar_id":"","url":"https://api.github.com/users/LasLabs","html_url":"https://github.com/LasLabs","followers_url":"https://api.github.com/users/LasLabs/followers","following_url":"https://api.github.com/users/LasLabs/following{/other_user}","gists_url":"https://api.github.com/users/LasLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/LasLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LasLabs/subscriptions","organizations_url":"https://api.github.com/users/LasLabs/orgs","repos_url":"https://api.github.com/users/LasLabs/repos","events_url":"https://api.github.com/users/LasLabs/events{/privacy}","received_events_url":"https://api.github.com/users/LasLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LasLabs/stock-logistics-workflow","description":"Odoo Stock, Workflow and Organization","fork":true,"url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow","forks_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/forks","keys_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/teams","hooks_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/hooks","issue_events_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/events","assignees_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/tags","blobs_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/languages","stargazers_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/stargazers","contributors_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/contributors","subscribers_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/subscribers","subscription_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/subscription","commits_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/merges","archive_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/downloads","issues_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/labels{/name}","releases_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/releases{/id}","deployments_url":"https://api.github.com/repos/LasLabs/stock-logistics-workflow/deployments","created_at":"2016-06-11T02:11:45Z","updated_at":"2016-06-11T02:11:47Z","pushed_at":"2017-04-12T02:02:38Z","git_url":"git://github.com/LasLabs/stock-logistics-workflow.git","ssh_url":"git@github.com:LasLabs/stock-logistics-workflow.git","clone_url":"https://github.com/LasLabs/stock-logistics-workflow.git","svn_url":"https://github.com/LasLabs/stock-logistics-workflow","homepage":"","size":1990,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"9.0"}},"base":{"label":"OCA:10.0","ref":"10.0","sha":"256755efe7aa4ff3c7589a10cdb086cb0ad89bd5","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars2.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":20891076,"name":"stock-logistics-workflow","full_name":"OCA/stock-logistics-workflow","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars2.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/stock-logistics-workflow","description":"Odoo Stock, Workflow and Organization","fork":false,"url":"https://api.github.com/repos/OCA/stock-logistics-workflow","forks_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/forks","keys_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/teams","hooks_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/hooks","issue_events_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/events","assignees_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/tags","blobs_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/languages","stargazers_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/stargazers","contributors_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/contributors","subscribers_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/subscribers","subscription_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/subscription","commits_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/merges","archive_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/downloads","issues_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/labels{/name}","releases_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/stock-logistics-workflow/deployments","created_at":"2014-06-16T16:00:29Z","updated_at":"2017-02-21T22:11:50Z","pushed_at":"2017-04-12T02:05:28Z","git_url":"git://github.com/OCA/stock-logistics-workflow.git","ssh_url":"git@github.com:OCA/stock-logistics-workflow.git","clone_url":"https://github.com/OCA/stock-logistics-workflow.git","svn_url":"https://github.com/OCA/stock-logistics-workflow","homepage":"","size":3588,"stargazers_count":36,"watchers_count":36,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":157,"mirror_url":null,"open_issues_count":79,"forks":157,"open_issues":79,"watchers":36,"default_branch":"10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323"},"html":{"href":"https://github.com/OCA/stock-logistics-workflow/pull/323"},"issue":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/323"},"comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/issues/323/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/pulls/323/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/stock-logistics-workflow/statuses/e075e7d3e76570bb240a15d5da8fdcff14ff47e1"}}}}
{"actor":{"display_login":"lasley"}}