{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/comments/90502979","pull_request_review_id":11022011,"id":90502979,"diff_hunk":"@@ -0,0 +1,39 @@\n+angular.module('scan_to_inventory').factory(\n+        'StockInventoryModel', [\n+        '$q', '$rootScope', 'jsonRpc',\n+        function ($q, $rootScope, jsonRpc) {\n+\n+    return {\n+        LoadDraftInventoryList: function() {\n+            return jsonRpc.searchRead(\n+                    'stock.inventory', [['state', '=', 'draft']], [\n+                    'id', 'name', 'date', 'inventory_line_qty',\n+                    ]).then(function (res) {\n+                $rootScope.DraftInventoryList = res.records;\n+                return res.records.length;\n+            });\n+        },\n+        CreateInventory: function(name) {\n+            return jsonRpc.call(\n+                    'stock.inventory', 'create_by_scan',\n+                    [name]).then(function (res) {","path":"scan_to_inventory/static/www/models/m_stock_inventory.js","position":19,"original_position":19,"commit_id":"dd6f374a9e08945b399ccea8ff92f9bdad422797","original_commit_id":"89647970b0a321cae0744963e5e405c7721467ca","user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"body":"I did not understood this part. but I guess that the first return is useless. (return jsonRpc.call).\r\nThe interest of this function is to store inventory quantity in a global var too, so we have to wait, don't we ?","created_at":"2016-12-01T18:06:18Z","updated_at":"2016-12-01T18:06:19Z","html_url":"https://github.com/OCA/stock-logistics-barcode/pull/50#discussion_r90502979","pull_request_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/comments/90502979"},"html":{"href":"https://github.com/OCA/stock-logistics-barcode/pull/50#discussion_r90502979"},"pull_request":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50","id":93456927,"html_url":"https://github.com/OCA/stock-logistics-barcode/pull/50","diff_url":"https://github.com/OCA/stock-logistics-barcode/pull/50.diff","patch_url":"https://github.com/OCA/stock-logistics-barcode/pull/50.patch","issue_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/50","number":50,"state":"open","locked":false,"title":"[7.0] [ADD] new module scan_to_inventory","user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"body":"Add new mobile module to make inventory with a mobile phone.\r\n\r\n* This module provides a new web apps, available on http(s)://my_oodoo_url/scan_to_inventory/static/www/index.html that allow user to use mobile (with barcode scanner) to make inventory.\r\n\r\n* FYI, this module works fine with the following devices\r\n    * robust mobile phone [Samsung Xcover 3](https://www.amazon.fr/Samsung-Galaxy-Xcover-VE-Smartphone/dp/B01FH8MDMW/ref=cm_cr_arp_d_product_top?ie=UTF8)\r\n    * Bluetooth Barcode scanner [KDC400](https://koamtac.com/kdc400-bluetooth-barcode-scanner/)\r\n\r\n* The complete description of the module is available [here](https://github.com/grap/stock-logistics-barcode/blob/7.0_ADD_scan_to_inventory/scan_to_inventory/README.rst). (screenshots, technologies, etc...)\r\n\r\n* You can test the feature with runbot. If you do so, please check : \r\n    * that the database is xxx-all. (module is not installed on xxx-base).\r\n    *  At least a product has a barcode defined. I set one with 5400313040109 for test.\r\n    * that the module 'product_multi_ean' is **NOT** installed. (Due to bad design of the module 'product_multi_ean'). I uninstalled it on runbot of this PR, and updated product module.\r\n    * tip \"Ctrl + Shift + M\" on your firefox browser, to emulate mobile device.\r\n\r\n**About Module name**\r\n* I'm not sure about the module name. @pedrobaeza, @dbeal, @sebastienbeau, could you take a look ? I propose : \r\n* scan_to_inventory (current name)\r\n* mobile_app_inventory\r\n* ionic_mobile_app_inventory\r\n* ionic_app_inventory\r\n\r\nBut i'd like to have your PoV, before making this change.\r\n\r\n**Possible refactoring in V8+**\r\nFor the time being, all the extra libs. (ionic, ...) are embeded in this module. when I'll port this module in new version, I'd like to split this module in two.\r\n* mobile_app_abstract, with all the generic libs and common features\r\n* mobile_app_inventory, that provides only the inventory feature\r\n\r\nThis refactoring should prevent duplicated code for other existing module, like scan_to_purchase module, that allow user to make a purchase order, scanning product. The module works correctly in production 6 months, and is available [here](https://github.com/grap/odoo-addons-mobile/tree/7.0/scan_to_purchase).","created_at":"2016-11-13T00:19:02Z","updated_at":"2016-12-01T18:06:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39fad1b9b967e863beee93f5e5641d3f609c7ddb","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OCA/stock-logistics-barcode/milestones/3","html_url":"https://github.com/OCA/stock-logistics-barcode/milestones/7.0","labels_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/milestones/3/labels","id":2131384,"number":3,"title":"7.0","description":null,"creator":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2016-11-13T00:17:08Z","updated_at":"2016-12-01T15:23:45Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50/commits","review_comments_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50/comments","review_comment_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/50/comments","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/statuses/dd6f374a9e08945b399ccea8ff92f9bdad422797","head":{"label":"grap:7.0_ADD_scan_to_inventory","ref":"7.0_ADD_scan_to_inventory","sha":"dd6f374a9e08945b399ccea8ff92f9bdad422797","user":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"repo":{"id":73584500,"name":"stock-logistics-barcode","full_name":"grap/stock-logistics-barcode","owner":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grap/stock-logistics-barcode","description":null,"fork":true,"url":"https://api.github.com/repos/grap/stock-logistics-barcode","forks_url":"https://api.github.com/repos/grap/stock-logistics-barcode/forks","keys_url":"https://api.github.com/repos/grap/stock-logistics-barcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grap/stock-logistics-barcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grap/stock-logistics-barcode/teams","hooks_url":"https://api.github.com/repos/grap/stock-logistics-barcode/hooks","issue_events_url":"https://api.github.com/repos/grap/stock-logistics-barcode/issues/events{/number}","events_url":"https://api.github.com/repos/grap/stock-logistics-barcode/events","assignees_url":"https://api.github.com/repos/grap/stock-logistics-barcode/assignees{/user}","branches_url":"https://api.github.com/repos/grap/stock-logistics-barcode/branches{/branch}","tags_url":"https://api.github.com/repos/grap/stock-logistics-barcode/tags","blobs_url":"https://api.github.com/repos/grap/stock-logistics-barcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grap/stock-logistics-barcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grap/stock-logistics-barcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/grap/stock-logistics-barcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grap/stock-logistics-barcode/statuses/{sha}","languages_url":"https://api.github.com/repos/grap/stock-logistics-barcode/languages","stargazers_url":"https://api.github.com/repos/grap/stock-logistics-barcode/stargazers","contributors_url":"https://api.github.com/repos/grap/stock-logistics-barcode/contributors","subscribers_url":"https://api.github.com/repos/grap/stock-logistics-barcode/subscribers","subscription_url":"https://api.github.com/repos/grap/stock-logistics-barcode/subscription","commits_url":"https://api.github.com/repos/grap/stock-logistics-barcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/grap/stock-logistics-barcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/grap/stock-logistics-barcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/grap/stock-logistics-barcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/grap/stock-logistics-barcode/contents/{+path}","compare_url":"https://api.github.com/repos/grap/stock-logistics-barcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grap/stock-logistics-barcode/merges","archive_url":"https://api.github.com/repos/grap/stock-logistics-barcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grap/stock-logistics-barcode/downloads","issues_url":"https://api.github.com/repos/grap/stock-logistics-barcode/issues{/number}","pulls_url":"https://api.github.com/repos/grap/stock-logistics-barcode/pulls{/number}","milestones_url":"https://api.github.com/repos/grap/stock-logistics-barcode/milestones{/number}","notifications_url":"https://api.github.com/repos/grap/stock-logistics-barcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grap/stock-logistics-barcode/labels{/name}","releases_url":"https://api.github.com/repos/grap/stock-logistics-barcode/releases{/id}","deployments_url":"https://api.github.com/repos/grap/stock-logistics-barcode/deployments","created_at":"2016-11-12T23:27:10Z","updated_at":"2016-11-12T23:27:11Z","pushed_at":"2016-12-01T18:04:20Z","git_url":"git://github.com/grap/stock-logistics-barcode.git","ssh_url":"git@github.com:grap/stock-logistics-barcode.git","clone_url":"https://github.com/grap/stock-logistics-barcode.git","svn_url":"https://github.com/grap/stock-logistics-barcode","homepage":null,"size":4363,"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":"10.0"}},"base":{"label":"OCA:7.0","ref":"7.0","sha":"631f67cde0119b7b913ac33f2940859b00010f91","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":20891020,"name":"stock-logistics-barcode","full_name":"OCA/stock-logistics-barcode","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/stock-logistics-barcode","description":null,"fork":false,"url":"https://api.github.com/repos/OCA/stock-logistics-barcode","forks_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/forks","keys_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/teams","hooks_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/hooks","issue_events_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/events","assignees_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/tags","blobs_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/languages","stargazers_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/stargazers","contributors_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/contributors","subscribers_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/subscribers","subscription_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/subscription","commits_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/merges","archive_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/downloads","issues_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/labels{/name}","releases_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/stock-logistics-barcode/deployments","created_at":"2014-06-16T15:58:49Z","updated_at":"2016-11-01T18:50:39Z","pushed_at":"2016-12-01T18:04:21Z","git_url":"git://github.com/OCA/stock-logistics-barcode.git","ssh_url":"git@github.com:OCA/stock-logistics-barcode.git","clone_url":"https://github.com/OCA/stock-logistics-barcode.git","svn_url":"https://github.com/OCA/stock-logistics-barcode","homepage":null,"size":5046,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":16,"forks":65,"open_issues":16,"watchers":23,"default_branch":"10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50"},"html":{"href":"https://github.com/OCA/stock-logistics-barcode/pull/50"},"issue":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/50"},"comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/stock-logistics-barcode/statuses/dd6f374a9e08945b399ccea8ff92f9bdad422797"}}}}
{"actor":{"display_login":"legalsylvain"}}