{"action":"created","comment":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/27442664","id":27442664,"diff_hunk":"@@ -24,128 +25,40 @@\n #\n ##############################################################################\n from openerp.osv import fields, osv\n-from openerp.tools.translate import _\n \n \n-class account_move_line(osv.Model):\n+class AccountMoveLine(osv.Model):\n     _inherit = \"account.move.line\"\n \n     \"\"\"\n     \"\"\"\n \n     _columns = {\n-        'sm_id': fields.many2one('stock.move', 'Stock move ID'),\n-        'location_id': fields.related('sm_id', 'location_id', string='Source Location',\n-            type='many2one', relation='stock.location', store=True, help='Location Move Source'),\n-        'location_dest_id': fields.related('sm_id', 'location_dest_id',\n-            type='many2one', string='Destination Location', relation='stock.location', store=True,\n-            help=\"Location Move Destination\")\n+        'sm_id': fields.many2one('stock.move', 'Stock move'),\n     }\n \n \n-class account_move(osv.Model):\n-    _inherit = \"account.move\"\n+class StockMove(osv.Model):\n+    _inherit = \"stock.move\"\n \n     \"\"\"\n     \"\"\"\n \n-    def _get_sm(self, cr, uid, ids, field_name, args, context=None):\n-        res = {}\n-        for record_id in ids:\n-            cr.execute(\n-                '''SELECT move_id,\n-                          sm_id\n-                   FROM account_move_line\n-                   WHERE move_id = %s LIMIT 1 ''' % (record_id,))\n-            if cr.rowcount:\n-                record_id, sm_id = cr.fetchall()[0]\n-                res[record_id] = sm_id\n-            else:\n-                res[record_id] = False\n-        return res\n-\n     _columns = {\n-        'sm_id': fields.function(_get_sm, method=True, type='many2one',\n-                                 relation='stock.move',\n-                                 string='Stock move ID', store=True),\n+        'am_id': fields.one2many(","path":"stock_move_entries/model/stock_move_entries.py","position":60,"original_position":60,"commit_id":"e22f0467a8dab8f3531173a4ceb1f900df46c60c","original_commit_id":"e22f0467a8dab8f3531173a4ceb1f900df46c60c","user":{"login":"hbto","id":7598010,"avatar_url":"https://avatars.githubusercontent.com/u/7598010?v=3","gravatar_id":"","url":"https://api.github.com/users/hbto","html_url":"https://github.com/hbto","followers_url":"https://api.github.com/users/hbto/followers","following_url":"https://api.github.com/users/hbto/following{/other_user}","gists_url":"https://api.github.com/users/hbto/gists{/gist_id}","starred_url":"https://api.github.com/users/hbto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbto/subscriptions","organizations_url":"https://api.github.com/users/hbto/orgs","repos_url":"https://api.github.com/users/hbto/repos","events_url":"https://api.github.com/users/hbto/events{/privacy}","received_events_url":"https://api.github.com/users/hbto/received_events","type":"User","site_admin":false},"body":"Let us change the name of this field from am_id to aml_ids,\r\nto adhere to established convention of using _ids for X2many fields.","created_at":"2015-03-30T23:44:01Z","updated_at":"2015-03-30T23:44:01Z","html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/156#discussion_r27442664","pull_request_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/27442664"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/156#discussion_r27442664"},"pull_request":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156","id":30596769,"html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/156","diff_url":"https://github.com/Vauxoo/addons-vauxoo/pull/156.diff","patch_url":"https://github.com/Vauxoo/addons-vauxoo/pull/156.patch","issue_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/156","number":156,"state":"open","locked":false,"title":"[REF][stock_move_entries] inherit _prepare_account_move_line for sm_id assign","user":{"login":"ernesto-gm","id":7605672,"avatar_url":"https://avatars.githubusercontent.com/u/7605672?v=3","gravatar_id":"","url":"https://api.github.com/users/ernesto-gm","html_url":"https://github.com/ernesto-gm","followers_url":"https://api.github.com/users/ernesto-gm/followers","following_url":"https://api.github.com/users/ernesto-gm/following{/other_user}","gists_url":"https://api.github.com/users/ernesto-gm/gists{/gist_id}","starred_url":"https://api.github.com/users/ernesto-gm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernesto-gm/subscriptions","organizations_url":"https://api.github.com/users/ernesto-gm/orgs","repos_url":"https://api.github.com/users/ernesto-gm/repos","events_url":"https://api.github.com/users/ernesto-gm/events{/privacy}","received_events_url":"https://api.github.com/users/ernesto-gm/received_events","type":"User","site_admin":false},"body":"[REF][stock_move_entries] inherit _prepare_account_move_line for sm_id assign","created_at":"2015-03-05T21:20:42Z","updated_at":"2015-03-30T23:44:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce90dbd887171e35bf23bc8e0a18099487ae1d42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156/commits","review_comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156/comments","review_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/156/comments","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/e22f0467a8dab8f3531173a4ceb1f900df46c60c","head":{"label":"vauxoo-dev:8.0-stock_move_entries_new_api-deb-ernesto","ref":"8.0-stock_move_entries_new_api-deb-ernesto","sha":"e22f0467a8dab8f3531173a4ceb1f900df46c60c","user":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":27313681,"name":"addons-vauxoo","full_name":"vauxoo-dev/addons-vauxoo","owner":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vauxoo-dev/addons-vauxoo","description":"","fork":true,"url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo","forks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/releases{/id}","created_at":"2014-11-29T20:09:46Z","updated_at":"2015-02-14T06:28:38Z","pushed_at":"2015-03-30T19:18:40Z","git_url":"git://github.com/vauxoo-dev/addons-vauxoo.git","ssh_url":"git@github.com:vauxoo-dev/addons-vauxoo.git","clone_url":"https://github.com/vauxoo-dev/addons-vauxoo.git","svn_url":"https://github.com/vauxoo-dev/addons-vauxoo","homepage":"","size":70034,"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":"master"}},"base":{"label":"Vauxoo:8.0","ref":"8.0","sha":"18eda1e5b4ce091e7647fe36591606417736406a","user":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"repo":{"id":27311720,"name":"addons-vauxoo","full_name":"Vauxoo/addons-vauxoo","owner":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vauxoo/addons-vauxoo","description":"All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core","fork":false,"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo","forks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/releases{/id}","created_at":"2014-11-29T18:51:03Z","updated_at":"2015-03-30T20:38:22Z","pushed_at":"2015-03-30T20:38:22Z","git_url":"git://github.com/Vauxoo/addons-vauxoo.git","ssh_url":"git@github.com:Vauxoo/addons-vauxoo.git","clone_url":"https://github.com/Vauxoo/addons-vauxoo.git","svn_url":"https://github.com/Vauxoo/addons-vauxoo","homepage":"http://www.vauxoo.com","size":64841,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":27,"forks":22,"open_issues":27,"watchers":11,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/156"},"issue":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/156"},"comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/e22f0467a8dab8f3531173a4ceb1f900df46c60c"}}}}