{"action":"created","comment":{"url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/comments/29575861","id":29575861,"diff_hunk":"@@ -29,6 +29,22 @@ class Product:\n     \"Product extension for Nereid\"\n     __name__ = \"product.product\"\n \n+    def serialize(self, purpose=None):\n+        \"\"\"\n+        Downstream implementation which adds a key called inventory_status\n+        to the dictionary if purpose is 'variant_selection'.\n+\n+        :param purpose: String which decides structure of dictionary\n+        \"\"\"\n+        res = super(Product, self).serialize(purpose=purpose)\n+\n+        if purpose == 'variant_selection':\n+            res.update({\n+                'inventory_status': self.inventory_status(),","path":"product.py","position":15,"original_position":15,"commit_id":"544ebf01923d8d43151920657ed36f77c86f23e4","original_commit_id":"544ebf01923d8d43151920657ed36f77c86f23e4","user":{"login":"PritishC","id":1412833,"avatar_url":"https://avatars.githubusercontent.com/u/1412833?v=3","gravatar_id":"","url":"https://api.github.com/users/PritishC","html_url":"https://github.com/PritishC","followers_url":"https://api.github.com/users/PritishC/followers","following_url":"https://api.github.com/users/PritishC/following{/other_user}","gists_url":"https://api.github.com/users/PritishC/gists{/gist_id}","starred_url":"https://api.github.com/users/PritishC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PritishC/subscriptions","organizations_url":"https://api.github.com/users/PritishC/orgs","repos_url":"https://api.github.com/users/PritishC/repos","events_url":"https://api.github.com/users/PritishC/events{/privacy}","received_events_url":"https://api.github.com/users/PritishC/received_events","type":"User","site_admin":false},"body":"nereid-catalog-variants is not dependent on nereid-cart-b2c. Hence the `serialize` method had to be overriden here itself.","created_at":"2015-05-04T10:11:39Z","updated_at":"2015-05-04T10:11:39Z","html_url":"https://github.com/openlabs/nereid-webshop/pull/363#discussion_r29575861","pull_request_url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363","_links":{"self":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/comments/29575861"},"html":{"href":"https://github.com/openlabs/nereid-webshop/pull/363#discussion_r29575861"},"pull_request":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363"}}},"pull_request":{"url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363","id":34534694,"html_url":"https://github.com/openlabs/nereid-webshop/pull/363","diff_url":"https://github.com/openlabs/nereid-webshop/pull/363.diff","patch_url":"https://github.com/openlabs/nereid-webshop/pull/363.patch","issue_url":"https://api.github.com/repos/openlabs/nereid-webshop/issues/363","number":363,"state":"open","locked":false,"title":"Fix inventory messages when nereid_catalog_variants is present #7571","user":{"login":"PritishC","id":1412833,"avatar_url":"https://avatars.githubusercontent.com/u/1412833?v=3","gravatar_id":"","url":"https://api.github.com/users/PritishC","html_url":"https://github.com/PritishC","followers_url":"https://api.github.com/users/PritishC/followers","following_url":"https://api.github.com/users/PritishC/following{/other_user}","gists_url":"https://api.github.com/users/PritishC/gists{/gist_id}","starred_url":"https://api.github.com/users/PritishC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PritishC/subscriptions","organizations_url":"https://api.github.com/users/PritishC/orgs","repos_url":"https://api.github.com/users/PritishC/repos","events_url":"https://api.github.com/users/PritishC/events{/privacy}","received_events_url":"https://api.github.com/users/PritishC/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-01T12:26:56Z","updated_at":"2015-05-04T10:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"124b4a0be14837aa326d030a8ccfb183916606d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363/commits","review_comments_url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363/comments","review_comment_url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openlabs/nereid-webshop/issues/363/comments","statuses_url":"https://api.github.com/repos/openlabs/nereid-webshop/statuses/544ebf01923d8d43151920657ed36f77c86f23e4","head":{"label":"PritishC:feature/task-7571","ref":"feature/task-7571","sha":"544ebf01923d8d43151920657ed36f77c86f23e4","user":{"login":"PritishC","id":1412833,"avatar_url":"https://avatars.githubusercontent.com/u/1412833?v=3","gravatar_id":"","url":"https://api.github.com/users/PritishC","html_url":"https://github.com/PritishC","followers_url":"https://api.github.com/users/PritishC/followers","following_url":"https://api.github.com/users/PritishC/following{/other_user}","gists_url":"https://api.github.com/users/PritishC/gists{/gist_id}","starred_url":"https://api.github.com/users/PritishC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PritishC/subscriptions","organizations_url":"https://api.github.com/users/PritishC/orgs","repos_url":"https://api.github.com/users/PritishC/repos","events_url":"https://api.github.com/users/PritishC/events{/privacy}","received_events_url":"https://api.github.com/users/PritishC/received_events","type":"User","site_admin":false},"repo":{"id":24843747,"name":"nereid-webshop","full_name":"PritishC/nereid-webshop","owner":{"login":"PritishC","id":1412833,"avatar_url":"https://avatars.githubusercontent.com/u/1412833?v=3","gravatar_id":"","url":"https://api.github.com/users/PritishC","html_url":"https://github.com/PritishC","followers_url":"https://api.github.com/users/PritishC/followers","following_url":"https://api.github.com/users/PritishC/following{/other_user}","gists_url":"https://api.github.com/users/PritishC/gists{/gist_id}","starred_url":"https://api.github.com/users/PritishC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PritishC/subscriptions","organizations_url":"https://api.github.com/users/PritishC/orgs","repos_url":"https://api.github.com/users/PritishC/repos","events_url":"https://api.github.com/users/PritishC/events{/privacy}","received_events_url":"https://api.github.com/users/PritishC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PritishC/nereid-webshop","description":"Full Webshop based on Tryton Nereid","fork":true,"url":"https://api.github.com/repos/PritishC/nereid-webshop","forks_url":"https://api.github.com/repos/PritishC/nereid-webshop/forks","keys_url":"https://api.github.com/repos/PritishC/nereid-webshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PritishC/nereid-webshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PritishC/nereid-webshop/teams","hooks_url":"https://api.github.com/repos/PritishC/nereid-webshop/hooks","issue_events_url":"https://api.github.com/repos/PritishC/nereid-webshop/issues/events{/number}","events_url":"https://api.github.com/repos/PritishC/nereid-webshop/events","assignees_url":"https://api.github.com/repos/PritishC/nereid-webshop/assignees{/user}","branches_url":"https://api.github.com/repos/PritishC/nereid-webshop/branches{/branch}","tags_url":"https://api.github.com/repos/PritishC/nereid-webshop/tags","blobs_url":"https://api.github.com/repos/PritishC/nereid-webshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PritishC/nereid-webshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PritishC/nereid-webshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/PritishC/nereid-webshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PritishC/nereid-webshop/statuses/{sha}","languages_url":"https://api.github.com/repos/PritishC/nereid-webshop/languages","stargazers_url":"https://api.github.com/repos/PritishC/nereid-webshop/stargazers","contributors_url":"https://api.github.com/repos/PritishC/nereid-webshop/contributors","subscribers_url":"https://api.github.com/repos/PritishC/nereid-webshop/subscribers","subscription_url":"https://api.github.com/repos/PritishC/nereid-webshop/subscription","commits_url":"https://api.github.com/repos/PritishC/nereid-webshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/PritishC/nereid-webshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/PritishC/nereid-webshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/PritishC/nereid-webshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/PritishC/nereid-webshop/contents/{+path}","compare_url":"https://api.github.com/repos/PritishC/nereid-webshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PritishC/nereid-webshop/merges","archive_url":"https://api.github.com/repos/PritishC/nereid-webshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PritishC/nereid-webshop/downloads","issues_url":"https://api.github.com/repos/PritishC/nereid-webshop/issues{/number}","pulls_url":"https://api.github.com/repos/PritishC/nereid-webshop/pulls{/number}","milestones_url":"https://api.github.com/repos/PritishC/nereid-webshop/milestones{/number}","notifications_url":"https://api.github.com/repos/PritishC/nereid-webshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PritishC/nereid-webshop/labels{/name}","releases_url":"https://api.github.com/repos/PritishC/nereid-webshop/releases{/id}","created_at":"2014-10-06T11:50:39Z","updated_at":"2014-12-06T05:27:09Z","pushed_at":"2015-05-01T18:14:10Z","git_url":"git://github.com/PritishC/nereid-webshop.git","ssh_url":"git@github.com:PritishC/nereid-webshop.git","clone_url":"https://github.com/PritishC/nereid-webshop.git","svn_url":"https://github.com/PritishC/nereid-webshop","homepage":null,"size":7335,"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":"develop"}},"base":{"label":"openlabs:develop","ref":"develop","sha":"d66868a8751fecea1761823fdcfa9bfcfe123815","user":{"login":"openlabs","id":777983,"avatar_url":"https://avatars.githubusercontent.com/u/777983?v=3","gravatar_id":"","url":"https://api.github.com/users/openlabs","html_url":"https://github.com/openlabs","followers_url":"https://api.github.com/users/openlabs/followers","following_url":"https://api.github.com/users/openlabs/following{/other_user}","gists_url":"https://api.github.com/users/openlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/openlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openlabs/subscriptions","organizations_url":"https://api.github.com/users/openlabs/orgs","repos_url":"https://api.github.com/users/openlabs/repos","events_url":"https://api.github.com/users/openlabs/events{/privacy}","received_events_url":"https://api.github.com/users/openlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14009597,"name":"nereid-webshop","full_name":"openlabs/nereid-webshop","owner":{"login":"openlabs","id":777983,"avatar_url":"https://avatars.githubusercontent.com/u/777983?v=3","gravatar_id":"","url":"https://api.github.com/users/openlabs","html_url":"https://github.com/openlabs","followers_url":"https://api.github.com/users/openlabs/followers","following_url":"https://api.github.com/users/openlabs/following{/other_user}","gists_url":"https://api.github.com/users/openlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/openlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openlabs/subscriptions","organizations_url":"https://api.github.com/users/openlabs/orgs","repos_url":"https://api.github.com/users/openlabs/repos","events_url":"https://api.github.com/users/openlabs/events{/privacy}","received_events_url":"https://api.github.com/users/openlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openlabs/nereid-webshop","description":"Full Webshop based on Tryton Nereid","fork":false,"url":"https://api.github.com/repos/openlabs/nereid-webshop","forks_url":"https://api.github.com/repos/openlabs/nereid-webshop/forks","keys_url":"https://api.github.com/repos/openlabs/nereid-webshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openlabs/nereid-webshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openlabs/nereid-webshop/teams","hooks_url":"https://api.github.com/repos/openlabs/nereid-webshop/hooks","issue_events_url":"https://api.github.com/repos/openlabs/nereid-webshop/issues/events{/number}","events_url":"https://api.github.com/repos/openlabs/nereid-webshop/events","assignees_url":"https://api.github.com/repos/openlabs/nereid-webshop/assignees{/user}","branches_url":"https://api.github.com/repos/openlabs/nereid-webshop/branches{/branch}","tags_url":"https://api.github.com/repos/openlabs/nereid-webshop/tags","blobs_url":"https://api.github.com/repos/openlabs/nereid-webshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openlabs/nereid-webshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openlabs/nereid-webshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/openlabs/nereid-webshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openlabs/nereid-webshop/statuses/{sha}","languages_url":"https://api.github.com/repos/openlabs/nereid-webshop/languages","stargazers_url":"https://api.github.com/repos/openlabs/nereid-webshop/stargazers","contributors_url":"https://api.github.com/repos/openlabs/nereid-webshop/contributors","subscribers_url":"https://api.github.com/repos/openlabs/nereid-webshop/subscribers","subscription_url":"https://api.github.com/repos/openlabs/nereid-webshop/subscription","commits_url":"https://api.github.com/repos/openlabs/nereid-webshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/openlabs/nereid-webshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/openlabs/nereid-webshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/openlabs/nereid-webshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/openlabs/nereid-webshop/contents/{+path}","compare_url":"https://api.github.com/repos/openlabs/nereid-webshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openlabs/nereid-webshop/merges","archive_url":"https://api.github.com/repos/openlabs/nereid-webshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openlabs/nereid-webshop/downloads","issues_url":"https://api.github.com/repos/openlabs/nereid-webshop/issues{/number}","pulls_url":"https://api.github.com/repos/openlabs/nereid-webshop/pulls{/number}","milestones_url":"https://api.github.com/repos/openlabs/nereid-webshop/milestones{/number}","notifications_url":"https://api.github.com/repos/openlabs/nereid-webshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openlabs/nereid-webshop/labels{/name}","releases_url":"https://api.github.com/repos/openlabs/nereid-webshop/releases{/id}","created_at":"2013-10-31T06:42:23Z","updated_at":"2015-04-30T18:24:26Z","pushed_at":"2015-05-01T18:14:10Z","git_url":"git://github.com/openlabs/nereid-webshop.git","ssh_url":"git@github.com:openlabs/nereid-webshop.git","clone_url":"https://github.com/openlabs/nereid-webshop.git","svn_url":"https://github.com/openlabs/nereid-webshop","homepage":null,"size":10033,"stargazers_count":7,"watchers_count":7,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":7,"forks":25,"open_issues":7,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363"},"html":{"href":"https://github.com/openlabs/nereid-webshop/pull/363"},"issue":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/issues/363"},"comments":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/issues/363/comments"},"review_comments":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363/comments"},"review_comment":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/pulls/363/commits"},"statuses":{"href":"https://api.github.com/repos/openlabs/nereid-webshop/statuses/544ebf01923d8d43151920657ed36f77c86f23e4"}}}}