{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/comments/138290388","pull_request_review_id":62063612,"id":138290388,"diff_hunk":"@@ -0,0 +1,55 @@\n+# -*- coding: utf-8 -*-\n+# Copyright 2011 Domsense s.r.l. <http://www.domsense.com>\n+# Copyright 2013 Lorenzo Battistini <lorenzo.battistini@agilebg.com>\n+# Copyright 2017 Vicent Cubells <vicent.cubells@tecnativa.com>\n+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).\n+\n+from odoo import api, fields, models\n+\n+\n+class AccountInvoiceLine(models.Model):\n+    _inherit = \"account.invoice.line\"\n+\n+    order_line_ids = fields.Many2many(\n+        comodel_name='sale.order.line',\n+        relation='sale_order_line_invoice_rel',\n+        column1='invoice_id',\n+        column2='order_line_id',\n+        string='Order Lines',\n+        readonly=True,\n+    )\n+\n+    prod_lot_ids = fields.Many2many(\n+        comodel_name='stock.production.lot',\n+        compute='_compute_prod_lots',\n+        string=\"Production Lots\",\n+    )\n+\n+    lot_formatted_note = fields.Html(\n+        string='Formatted Note',\n+        compute='_compute_line_lots',\n+    )\n+\n+    @api.multi\n+    def _compute_prod_lots(self):\n+        for line in self:\n+            if not line.move_line_ids and not line.order_line_ids:\n+                return\n+            if line.move_line_ids:\n+                line.prod_lot_ids = self.mapped(\n+                    'move_line_ids.lot_ids')\n+            else:\n+                line.prod_lot_ids = self.mapped(","path":"account_invoice_production_lot/models/account_invoice.py","position":42,"original_position":42,"commit_id":"35f24d1b5f42f96425ef573f58dca84c140777d3","original_commit_id":"35f24d1b5f42f96425ef573f58dca84c140777d3","user":{"login":"cubells","id":4386443,"avatar_url":"https://avatars0.githubusercontent.com/u/4386443?v=4","gravatar_id":"","url":"https://api.github.com/users/cubells","html_url":"https://github.com/cubells","followers_url":"https://api.github.com/users/cubells/followers","following_url":"https://api.github.com/users/cubells/following{/other_user}","gists_url":"https://api.github.com/users/cubells/gists{/gist_id}","starred_url":"https://api.github.com/users/cubells/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubells/subscriptions","organizations_url":"https://api.github.com/users/cubells/orgs","repos_url":"https://api.github.com/users/cubells/repos","events_url":"https://api.github.com/users/cubells/events{/privacy}","received_events_url":"https://api.github.com/users/cubells/received_events","type":"User","site_admin":false},"body":"Ok, I understand.","created_at":"2017-09-12T09:02:46Z","updated_at":"2017-09-12T09:02:46Z","html_url":"https://github.com/OCA/account-invoice-reporting/pull/61#discussion_r138290388","pull_request_url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/comments/138290388"},"html":{"href":"https://github.com/OCA/account-invoice-reporting/pull/61#discussion_r138290388"},"pull_request":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61"}},"in_reply_to_id":138289974},"pull_request":{"url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61","id":140084666,"html_url":"https://github.com/OCA/account-invoice-reporting/pull/61","diff_url":"https://github.com/OCA/account-invoice-reporting/pull/61.diff","patch_url":"https://github.com/OCA/account-invoice-reporting/pull/61.patch","issue_url":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/61","number":61,"state":"open","locked":false,"title":"[MIG] account_invoice_production_lot: Migration to 10.0","user":{"login":"cubells","id":4386443,"avatar_url":"https://avatars0.githubusercontent.com/u/4386443?v=4","gravatar_id":"","url":"https://api.github.com/users/cubells","html_url":"https://github.com/cubells","followers_url":"https://api.github.com/users/cubells/followers","following_url":"https://api.github.com/users/cubells/following{/other_user}","gists_url":"https://api.github.com/users/cubells/gists{/gist_id}","starred_url":"https://api.github.com/users/cubells/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubells/subscriptions","organizations_url":"https://api.github.com/users/cubells/orgs","repos_url":"https://api.github.com/users/cubells/repos","events_url":"https://api.github.com/users/cubells/events{/privacy}","received_events_url":"https://api.github.com/users/cubells/received_events","type":"User","site_admin":false},"body":"Depends on\r\n- [ ] https://github.com/OCA/stock-logistics-workflow/pull/347\r\n\r\n* Update README\r\n* Update views\r\n* Update translations\r\n* Update demo data\r\n* Update tests\r\n\r\ncc @Tecnativa","created_at":"2017-09-08T17:10:31Z","updated_at":"2017-09-12T09:02:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"661ac37e413ab455fbbf2e99843066c583f28501","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61/commits","review_comments_url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61/comments","review_comment_url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/61/comments","statuses_url":"https://api.github.com/repos/OCA/account-invoice-reporting/statuses/35f24d1b5f42f96425ef573f58dca84c140777d3","head":{"label":"Tecnativa:10.0-mig-account_invoice_production_lot","ref":"10.0-mig-account_invoice_production_lot","sha":"35f24d1b5f42f96425ef573f58dca84c140777d3","user":{"login":"Tecnativa","id":18120193,"avatar_url":"https://avatars2.githubusercontent.com/u/18120193?v=4","gravatar_id":"","url":"https://api.github.com/users/Tecnativa","html_url":"https://github.com/Tecnativa","followers_url":"https://api.github.com/users/Tecnativa/followers","following_url":"https://api.github.com/users/Tecnativa/following{/other_user}","gists_url":"https://api.github.com/users/Tecnativa/gists{/gist_id}","starred_url":"https://api.github.com/users/Tecnativa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tecnativa/subscriptions","organizations_url":"https://api.github.com/users/Tecnativa/orgs","repos_url":"https://api.github.com/users/Tecnativa/repos","events_url":"https://api.github.com/users/Tecnativa/events{/privacy}","received_events_url":"https://api.github.com/users/Tecnativa/received_events","type":"Organization","site_admin":false},"repo":{"id":78690296,"name":"account-invoice-reporting","full_name":"Tecnativa/account-invoice-reporting","owner":{"login":"Tecnativa","id":18120193,"avatar_url":"https://avatars2.githubusercontent.com/u/18120193?v=4","gravatar_id":"","url":"https://api.github.com/users/Tecnativa","html_url":"https://github.com/Tecnativa","followers_url":"https://api.github.com/users/Tecnativa/followers","following_url":"https://api.github.com/users/Tecnativa/following{/other_user}","gists_url":"https://api.github.com/users/Tecnativa/gists{/gist_id}","starred_url":"https://api.github.com/users/Tecnativa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tecnativa/subscriptions","organizations_url":"https://api.github.com/users/Tecnativa/orgs","repos_url":"https://api.github.com/users/Tecnativa/repos","events_url":"https://api.github.com/users/Tecnativa/events{/privacy}","received_events_url":"https://api.github.com/users/Tecnativa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tecnativa/account-invoice-reporting","description":"Odoo Invoicing reports","fork":true,"url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting","forks_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/forks","keys_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/teams","hooks_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/hooks","issue_events_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/events","assignees_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/tags","blobs_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/languages","stargazers_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/stargazers","contributors_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/contributors","subscribers_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/subscribers","subscription_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/subscription","commits_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/merges","archive_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/downloads","issues_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/labels{/name}","releases_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/Tecnativa/account-invoice-reporting/deployments","created_at":"2017-01-11T23:44:45Z","updated_at":"2017-01-11T23:44:48Z","pushed_at":"2017-09-12T08:59:06Z","git_url":"git://github.com/Tecnativa/account-invoice-reporting.git","ssh_url":"git@github.com:Tecnativa/account-invoice-reporting.git","clone_url":"https://github.com/Tecnativa/account-invoice-reporting.git","svn_url":"https://github.com/Tecnativa/account-invoice-reporting","homepage":"","size":940,"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":"10.0"}},"base":{"label":"OCA:10.0","ref":"10.0","sha":"c9329d774bcdfd5196598bf570f825e924eafabe","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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":20881793,"name":"account-invoice-reporting","full_name":"OCA/account-invoice-reporting","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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/account-invoice-reporting","description":"Odoo Invoicing reports","fork":false,"url":"https://api.github.com/repos/OCA/account-invoice-reporting","forks_url":"https://api.github.com/repos/OCA/account-invoice-reporting/forks","keys_url":"https://api.github.com/repos/OCA/account-invoice-reporting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/account-invoice-reporting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/account-invoice-reporting/teams","hooks_url":"https://api.github.com/repos/OCA/account-invoice-reporting/hooks","issue_events_url":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/account-invoice-reporting/events","assignees_url":"https://api.github.com/repos/OCA/account-invoice-reporting/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/account-invoice-reporting/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/account-invoice-reporting/tags","blobs_url":"https://api.github.com/repos/OCA/account-invoice-reporting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/account-invoice-reporting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/account-invoice-reporting/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/account-invoice-reporting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/account-invoice-reporting/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/account-invoice-reporting/languages","stargazers_url":"https://api.github.com/repos/OCA/account-invoice-reporting/stargazers","contributors_url":"https://api.github.com/repos/OCA/account-invoice-reporting/contributors","subscribers_url":"https://api.github.com/repos/OCA/account-invoice-reporting/subscribers","subscription_url":"https://api.github.com/repos/OCA/account-invoice-reporting/subscription","commits_url":"https://api.github.com/repos/OCA/account-invoice-reporting/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/account-invoice-reporting/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/account-invoice-reporting/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/account-invoice-reporting/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/account-invoice-reporting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/account-invoice-reporting/merges","archive_url":"https://api.github.com/repos/OCA/account-invoice-reporting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/account-invoice-reporting/downloads","issues_url":"https://api.github.com/repos/OCA/account-invoice-reporting/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/account-invoice-reporting/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/account-invoice-reporting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/account-invoice-reporting/labels{/name}","releases_url":"https://api.github.com/repos/OCA/account-invoice-reporting/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/account-invoice-reporting/deployments","created_at":"2014-06-16T11:00:20Z","updated_at":"2017-08-21T09:56:00Z","pushed_at":"2017-09-12T08:59:07Z","git_url":"git://github.com/OCA/account-invoice-reporting.git","ssh_url":"git@github.com:OCA/account-invoice-reporting.git","clone_url":"https://github.com/OCA/account-invoice-reporting.git","svn_url":"https://github.com/OCA/account-invoice-reporting","homepage":"","size":1057,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":15,"forks":61,"open_issues":15,"watchers":10,"default_branch":"10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61"},"html":{"href":"https://github.com/OCA/account-invoice-reporting/pull/61"},"issue":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/61"},"comments":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/account-invoice-reporting/statuses/35f24d1b5f42f96425ef573f58dca84c140777d3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"cubells"}}