{"action":"created","comment":{"url":"https://api.github.com/repos/odoo/ps-lct/pulls/comments/46871730","id":46871730,"diff_hunk":"@@ -180,13 +212,117 @@ def _merge_invoice_line_pair(self, cr, uid, id1, id2, context=None):\n         return line1.id\n \n     def create(self, cr, uid, vals, context=None):\n+        pricelist_obj = self.pool.get('product.pricelist')\n+        cont_nr_obj = self.pool[\"lct.container.number\"]\n+        group_model = self.pool[\"account.invoice.line.group\"]\n+\n         if 'invoice_id' in vals and vals['invoice_id']:\n             invoice = self.pool.get('account.invoice').browse(cr, uid, vals['invoice_id'], context=context)\n             if invoice.type2 and 'partner_id' in invoice and invoice.partner_id:\n                 tax = invoice.partner_id.tax_id\n                 if tax:\n                     vals['invoice_line_tax_id'] = [(6, False, [tax.id])]\n-        return super(account_invoice_line, self).create(cr, uid, vals, context=context)\n+\n+        group_id = self.pool[\"account.invoice.line.group\"].create(cr, uid, {}, context=context)","path":"lct_tos_integration/models/account.py","position":98,"original_position":98,"commit_id":"b7661548d64f9afb353f6ceec1aa9ccffb0d3ece","original_commit_id":"b7661548d64f9afb353f6ceec1aa9ccffb0d3ece","user":{"login":"tgr-odoo","id":8057782,"avatar_url":"https://avatars.githubusercontent.com/u/8057782?v=3","gravatar_id":"","url":"https://api.github.com/users/tgr-odoo","html_url":"https://github.com/tgr-odoo","followers_url":"https://api.github.com/users/tgr-odoo/followers","following_url":"https://api.github.com/users/tgr-odoo/following{/other_user}","gists_url":"https://api.github.com/users/tgr-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/tgr-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgr-odoo/subscriptions","organizations_url":"https://api.github.com/users/tgr-odoo/orgs","repos_url":"https://api.github.com/users/tgr-odoo/repos","events_url":"https://api.github.com/users/tgr-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/tgr-odoo/received_events","type":"User","site_admin":false},"body":"You defined group_model above, why not use it?","created_at":"2015-12-07T20:21:10Z","updated_at":"2015-12-07T20:21:10Z","html_url":"https://github.com/odoo/ps-lct/pull/2#discussion_r46871730","pull_request_url":"https://api.github.com/repos/odoo/ps-lct/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/comments/46871730"},"html":{"href":"https://github.com/odoo/ps-lct/pull/2#discussion_r46871730"},"pull_request":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/odoo/ps-lct/pulls/2","id":52891767,"html_url":"https://github.com/odoo/ps-lct/pull/2","diff_url":"https://github.com/odoo/ps-lct/pull/2.diff","patch_url":"https://github.com/odoo/ps-lct/pull/2.patch","issue_url":"https://api.github.com/repos/odoo/ps-lct/issues/2","number":2,"state":"open","locked":false,"title":"7.0 21175 nfl","user":{"login":"tgr-odoo","id":8057782,"avatar_url":"https://avatars.githubusercontent.com/u/8057782?v=3","gravatar_id":"","url":"https://api.github.com/users/tgr-odoo","html_url":"https://github.com/tgr-odoo","followers_url":"https://api.github.com/users/tgr-odoo/followers","following_url":"https://api.github.com/users/tgr-odoo/following{/other_user}","gists_url":"https://api.github.com/users/tgr-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/tgr-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgr-odoo/subscriptions","organizations_url":"https://api.github.com/users/tgr-odoo/orgs","repos_url":"https://api.github.com/users/tgr-odoo/repos","events_url":"https://api.github.com/users/tgr-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/tgr-odoo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-07T19:51:36Z","updated_at":"2015-12-07T20:21:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd78521509ff118317b8d2be6f7d7fff24005563","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoo/ps-lct/pulls/2/commits","review_comments_url":"https://api.github.com/repos/odoo/ps-lct/pulls/2/comments","review_comment_url":"https://api.github.com/repos/odoo/ps-lct/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoo/ps-lct/issues/2/comments","statuses_url":"https://api.github.com/repos/odoo/ps-lct/statuses/b7661548d64f9afb353f6ceec1aa9ccffb0d3ece","head":{"label":"odoo:7.0-21175-nfl","ref":"7.0-21175-nfl","sha":"b7661548d64f9afb353f6ceec1aa9ccffb0d3ece","user":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":21822727,"name":"ps-lct","full_name":"odoo/ps-lct","owner":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo/ps-lct","description":"API","fork":false,"url":"https://api.github.com/repos/odoo/ps-lct","forks_url":"https://api.github.com/repos/odoo/ps-lct/forks","keys_url":"https://api.github.com/repos/odoo/ps-lct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/ps-lct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/ps-lct/teams","hooks_url":"https://api.github.com/repos/odoo/ps-lct/hooks","issue_events_url":"https://api.github.com/repos/odoo/ps-lct/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/ps-lct/events","assignees_url":"https://api.github.com/repos/odoo/ps-lct/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/ps-lct/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/ps-lct/tags","blobs_url":"https://api.github.com/repos/odoo/ps-lct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/ps-lct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/ps-lct/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/ps-lct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/ps-lct/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/ps-lct/languages","stargazers_url":"https://api.github.com/repos/odoo/ps-lct/stargazers","contributors_url":"https://api.github.com/repos/odoo/ps-lct/contributors","subscribers_url":"https://api.github.com/repos/odoo/ps-lct/subscribers","subscription_url":"https://api.github.com/repos/odoo/ps-lct/subscription","commits_url":"https://api.github.com/repos/odoo/ps-lct/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/ps-lct/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/ps-lct/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/ps-lct/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoo/ps-lct/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/ps-lct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/ps-lct/merges","archive_url":"https://api.github.com/repos/odoo/ps-lct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/ps-lct/downloads","issues_url":"https://api.github.com/repos/odoo/ps-lct/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/ps-lct/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/ps-lct/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/ps-lct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/ps-lct/labels{/name}","releases_url":"https://api.github.com/repos/odoo/ps-lct/releases{/id}","created_at":"2014-07-14T14:33:03Z","updated_at":"2015-12-06T02:50:36Z","pushed_at":"2015-12-07T19:51:36Z","git_url":"git://github.com/odoo/ps-lct.git","ssh_url":"git@github.com:odoo/ps-lct.git","clone_url":"https://github.com/odoo/ps-lct.git","svn_url":"https://github.com/odoo/ps-lct","homepage":"","size":2966,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":1,"default_branch":"7.0"}},"base":{"label":"odoo:7.0","ref":"7.0","sha":"20e0d59c9f879a374718ad9a7f4b8a94f1ba0b0a","user":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":21822727,"name":"ps-lct","full_name":"odoo/ps-lct","owner":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo/ps-lct","description":"API","fork":false,"url":"https://api.github.com/repos/odoo/ps-lct","forks_url":"https://api.github.com/repos/odoo/ps-lct/forks","keys_url":"https://api.github.com/repos/odoo/ps-lct/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/ps-lct/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/ps-lct/teams","hooks_url":"https://api.github.com/repos/odoo/ps-lct/hooks","issue_events_url":"https://api.github.com/repos/odoo/ps-lct/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/ps-lct/events","assignees_url":"https://api.github.com/repos/odoo/ps-lct/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/ps-lct/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/ps-lct/tags","blobs_url":"https://api.github.com/repos/odoo/ps-lct/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/ps-lct/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/ps-lct/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/ps-lct/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/ps-lct/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/ps-lct/languages","stargazers_url":"https://api.github.com/repos/odoo/ps-lct/stargazers","contributors_url":"https://api.github.com/repos/odoo/ps-lct/contributors","subscribers_url":"https://api.github.com/repos/odoo/ps-lct/subscribers","subscription_url":"https://api.github.com/repos/odoo/ps-lct/subscription","commits_url":"https://api.github.com/repos/odoo/ps-lct/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/ps-lct/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/ps-lct/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/ps-lct/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoo/ps-lct/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/ps-lct/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/ps-lct/merges","archive_url":"https://api.github.com/repos/odoo/ps-lct/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/ps-lct/downloads","issues_url":"https://api.github.com/repos/odoo/ps-lct/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/ps-lct/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/ps-lct/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/ps-lct/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/ps-lct/labels{/name}","releases_url":"https://api.github.com/repos/odoo/ps-lct/releases{/id}","created_at":"2014-07-14T14:33:03Z","updated_at":"2015-12-06T02:50:36Z","pushed_at":"2015-12-07T19:51:36Z","git_url":"git://github.com/odoo/ps-lct.git","ssh_url":"git@github.com:odoo/ps-lct.git","clone_url":"https://github.com/odoo/ps-lct.git","svn_url":"https://github.com/odoo/ps-lct","homepage":"","size":2966,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":1,"default_branch":"7.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/2"},"html":{"href":"https://github.com/odoo/ps-lct/pull/2"},"issue":{"href":"https://api.github.com/repos/odoo/ps-lct/issues/2"},"comments":{"href":"https://api.github.com/repos/odoo/ps-lct/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoo/ps-lct/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/ps-lct/statuses/b7661548d64f9afb353f6ceec1aa9ccffb0d3ece"}}}}