{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/comments/80589659","id":80589659,"diff_hunk":"@@ -0,0 +1,49 @@\n+# -*- coding: utf-8 -*-\n+# © 2016 Lorenzo Battistini - Agile Business Group - I.A.S. Ingenieria, Aplicaciones y Software\n+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n+\n+from openerp import tools\n+from openerp import models, fields\n+\n+\n+class StockAnalysis(models.Model):\n+    _name = 'stock.analysis'\n+    _auto = False\n+    _rec_name = 'product_id'\n+\n+    product_id = fields.Many2one(\n+        'product.product', string='Product', readonly=True)\n+    location_id = fields.Many2one(\n+        'stock.location', string='Location', readonly=True)\n+    qty = fields.Float(string='Quantity', readonly=True)\n+    lot_id = fields.Many2one(\n+        'stock.production.lot', string='Lot', readonly=True)\n+    package_id = fields.Many2one(\n+        'stock.quant.package', string='Package', readonly=True)\n+    in_date = fields.Datetime('Incoming Date', readonly=True)\n+    categ_id = fields.Many2one(\n+        'product.category', string='Category', readonly=True)\n+    company_id = fields.Many2one(\n+        'res.company', string='Company', readonly=True)\n+\n+    def init(self, cr):","path":"stock_analysis/models/stock_analysis.py","position":28,"original_position":29,"commit_id":"8fe10948ba77684a0d67b345efdb0ea64fd7db45","original_commit_id":"42ecab183f1a13be641c57ce68f46a825060c5e0","user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.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},"body":"You can use the same technique as Odoo standard modules that split the query in several parts and call a method for getting that part. This way, you easy a lot the inheratibility of this module. See an example here: https://github.com/odoo/odoo/blob/e318a964901b90eabfbb970a0a2a756bc3e3d7fa/addons/account/report/account_invoice_report.py#L161-L177","created_at":"2016-09-26T22:42:12Z","updated_at":"2016-09-26T22:42:12Z","html_url":"https://github.com/OCA/stock-logistics-reporting/pull/26#discussion_r80589659","pull_request_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/comments/80589659"},"html":{"href":"https://github.com/OCA/stock-logistics-reporting/pull/26#discussion_r80589659"},"pull_request":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26","id":86800848,"html_url":"https://github.com/OCA/stock-logistics-reporting/pull/26","diff_url":"https://github.com/OCA/stock-logistics-reporting/pull/26.diff","patch_url":"https://github.com/OCA/stock-logistics-reporting/pull/26.patch","issue_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/26","number":26,"state":"open","locked":false,"title":"ADD - Add stock_analysis for Odoo9 in menu root reporting","user":{"login":"fr33co","id":1943872,"avatar_url":"https://avatars.githubusercontent.com/u/1943872?v=3","gravatar_id":"","url":"https://api.github.com/users/fr33co","html_url":"https://github.com/fr33co","followers_url":"https://api.github.com/users/fr33co/followers","following_url":"https://api.github.com/users/fr33co/following{/other_user}","gists_url":"https://api.github.com/users/fr33co/gists{/gist_id}","starred_url":"https://api.github.com/users/fr33co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fr33co/subscriptions","organizations_url":"https://api.github.com/users/fr33co/orgs","repos_url":"https://api.github.com/users/fr33co/repos","events_url":"https://api.github.com/users/fr33co/events{/privacy}","received_events_url":"https://api.github.com/users/fr33co/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-26T19:10:25Z","updated_at":"2016-09-26T22:42:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98085426040808bb5d27a8970b5808c57d52c4e6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26/commits","review_comments_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26/comments","review_comment_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/26/comments","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/statuses/8fe10948ba77684a0d67b345efdb0ea64fd7db45","head":{"label":"fr33co:9.0","ref":"9.0","sha":"8fe10948ba77684a0d67b345efdb0ea64fd7db45","user":{"login":"fr33co","id":1943872,"avatar_url":"https://avatars.githubusercontent.com/u/1943872?v=3","gravatar_id":"","url":"https://api.github.com/users/fr33co","html_url":"https://github.com/fr33co","followers_url":"https://api.github.com/users/fr33co/followers","following_url":"https://api.github.com/users/fr33co/following{/other_user}","gists_url":"https://api.github.com/users/fr33co/gists{/gist_id}","starred_url":"https://api.github.com/users/fr33co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fr33co/subscriptions","organizations_url":"https://api.github.com/users/fr33co/orgs","repos_url":"https://api.github.com/users/fr33co/repos","events_url":"https://api.github.com/users/fr33co/events{/privacy}","received_events_url":"https://api.github.com/users/fr33co/received_events","type":"User","site_admin":false},"repo":{"id":69282089,"name":"stock-logistics-reporting","full_name":"fr33co/stock-logistics-reporting","owner":{"login":"fr33co","id":1943872,"avatar_url":"https://avatars.githubusercontent.com/u/1943872?v=3","gravatar_id":"","url":"https://api.github.com/users/fr33co","html_url":"https://github.com/fr33co","followers_url":"https://api.github.com/users/fr33co/followers","following_url":"https://api.github.com/users/fr33co/following{/other_user}","gists_url":"https://api.github.com/users/fr33co/gists{/gist_id}","starred_url":"https://api.github.com/users/fr33co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fr33co/subscriptions","organizations_url":"https://api.github.com/users/fr33co/orgs","repos_url":"https://api.github.com/users/fr33co/repos","events_url":"https://api.github.com/users/fr33co/events{/privacy}","received_events_url":"https://api.github.com/users/fr33co/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fr33co/stock-logistics-reporting","description":null,"fork":true,"url":"https://api.github.com/repos/fr33co/stock-logistics-reporting","forks_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/forks","keys_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/teams","hooks_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/hooks","issue_events_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/events","assignees_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/tags","blobs_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/languages","stargazers_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/stargazers","contributors_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/contributors","subscribers_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/subscribers","subscription_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/subscription","commits_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/merges","archive_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/downloads","issues_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/labels{/name}","releases_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/fr33co/stock-logistics-reporting/deployments","created_at":"2016-09-26T18:50:55Z","updated_at":"2016-09-26T18:50:56Z","pushed_at":"2016-09-26T20:31:47Z","git_url":"git://github.com/fr33co/stock-logistics-reporting.git","ssh_url":"git@github.com:fr33co/stock-logistics-reporting.git","clone_url":"https://github.com/fr33co/stock-logistics-reporting.git","svn_url":"https://github.com/fr33co/stock-logistics-reporting","homepage":null,"size":183,"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:9.0","ref":"9.0","sha":"b4af0c512d37799a172ab8c18ca1a8686043749c","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":20891392,"name":"stock-logistics-reporting","full_name":"OCA/stock-logistics-reporting","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-reporting","description":"","fork":false,"url":"https://api.github.com/repos/OCA/stock-logistics-reporting","forks_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/forks","keys_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/teams","hooks_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/hooks","issue_events_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/events","assignees_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/tags","blobs_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/languages","stargazers_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/stargazers","contributors_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/contributors","subscribers_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/subscribers","subscription_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/subscription","commits_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/merges","archive_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/downloads","issues_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/labels{/name}","releases_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/stock-logistics-reporting/deployments","created_at":"2014-06-16T16:09:19Z","updated_at":"2016-04-14T02:46:43Z","pushed_at":"2016-09-26T20:31:48Z","git_url":"git://github.com/OCA/stock-logistics-reporting.git","ssh_url":"git@github.com:OCA/stock-logistics-reporting.git","clone_url":"https://github.com/OCA/stock-logistics-reporting.git","svn_url":"https://github.com/OCA/stock-logistics-reporting","homepage":null,"size":324,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":8,"forks":30,"open_issues":8,"watchers":9,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26"},"html":{"href":"https://github.com/OCA/stock-logistics-reporting/pull/26"},"issue":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/26"},"comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/stock-logistics-reporting/statuses/8fe10948ba77684a0d67b345efdb0ea64fd7db45"}}}}
{"actor":{"display_login":"pedrobaeza"}}