{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/pos/pulls/comments/27209224","id":27209224,"diff_hunk":"@@ -0,0 +1,43 @@\n+# -*- encoding: utf-8 -*-\n+##############################################################################\n+#\n+#    Point Of Sale - Keep Draft Orders module for Odoo\n+#    Copyright (C) 2013-Today GRAP (http://www.grap.coop)\n+#    @author Julien WESTE\n+#    @author Sylvain LE GAL (https://twitter.com/legalsylvain)\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU Affero General Public License as\n+#    published by the Free Software Foundation, either version 3 of the\n+#    License, or (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU Affero General Public License for more details.\n+#\n+#    You should have received a copy of the GNU Affero General Public License\n+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+##############################################################################\n+\n+from openerp.osv import fields\n+from openerp.osv.orm import Model\n+\n+\n+class pos_order(Model):\n+    _inherit = 'pos.order'\n+\n+    # Functional Field Section\n+    def _get_is_partial_paid(\n+            self, cr, uid, ids, name, arg, context=None):\n+        res = {}\n+        for po in self.browse(cr, uid, ids, context=context):\n+            res[po.id] = (po.state == 'draft') and len(po.statement_ids) != 0","path":"pos_keep_draft_orders/model/pos_order.py","position":36,"original_position":36,"commit_id":"05573d753a3cd0f6e2caa479bf7f8fd8d05f314b","original_commit_id":"05573d753a3cd0f6e2caa479bf7f8fd8d05f314b","user":{"login":"lmignon","id":544090,"avatar_url":"https://avatars.githubusercontent.com/u/544090?v=3","gravatar_id":"","url":"https://api.github.com/users/lmignon","html_url":"https://github.com/lmignon","followers_url":"https://api.github.com/users/lmignon/followers","following_url":"https://api.github.com/users/lmignon/following{/other_user}","gists_url":"https://api.github.com/users/lmignon/gists{/gist_id}","starred_url":"https://api.github.com/users/lmignon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmignon/subscriptions","organizations_url":"https://api.github.com/users/lmignon/orgs","repos_url":"https://api.github.com/users/lmignon/repos","events_url":"https://api.github.com/users/lmignon/events{/privacy}","received_events_url":"https://api.github.com/users/lmignon/received_events","type":"User","site_admin":false},"body":"`!= 0` is not required\r\n```python\r\nres[po.id] = (po.state == 'draft') and len(po.statement_ids) \r\n```","created_at":"2015-03-26T12:52:03Z","updated_at":"2015-03-26T12:52:03Z","html_url":"https://github.com/OCA/pos/pull/17#discussion_r27209224","pull_request_url":"https://api.github.com/repos/OCA/pos/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/OCA/pos/pulls/comments/27209224"},"html":{"href":"https://github.com/OCA/pos/pull/17#discussion_r27209224"},"pull_request":{"href":"https://api.github.com/repos/OCA/pos/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/pos/pulls/17","id":30858603,"html_url":"https://github.com/OCA/pos/pull/17","diff_url":"https://github.com/OCA/pos/pull/17.diff","patch_url":"https://github.com/OCA/pos/pull/17.patch","issue_url":"https://api.github.com/repos/OCA/pos/issues/17","number":17,"state":"open","locked":false,"title":"[ADD] new module pos_keep_draft_orders to let orders in 'draft' state","user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"body":"This module allow users to let a PoS Order in a 'draft' state when closing the session.\r\nPlease see full description in OpenERP file.\r\n\r\nRemarks are welcome.\r\n\r\nCode Coverage of this module : 100%.\r\n\r\nKind regards.","created_at":"2015-03-10T15:06:47Z","updated_at":"2015-03-26T12:52:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b22bbd47a8fd0ac66eb92778240ed2e3a3607be","assignee":null,"milestone":{"url":"https://api.github.com/repos/OCA/pos/milestones/1","html_url":"https://github.com/OCA/pos/milestones/7.0","labels_url":"https://api.github.com/repos/OCA/pos/milestones/1/labels","id":867766,"number":1,"title":"7.0","description":null,"creator":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":5,"state":"open","created_at":"2014-11-15T16:41:24Z","updated_at":"2015-03-10T17:04:15Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/pos/pulls/17/commits","review_comments_url":"https://api.github.com/repos/OCA/pos/pulls/17/comments","review_comment_url":"https://api.github.com/repos/OCA/pos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/pos/issues/17/comments","statuses_url":"https://api.github.com/repos/OCA/pos/statuses/05573d753a3cd0f6e2caa479bf7f8fd8d05f314b","head":{"label":"grap:7.0-pos_keep_draft_orders","ref":"7.0-pos_keep_draft_orders","sha":"05573d753a3cd0f6e2caa479bf7f8fd8d05f314b","user":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"repo":{"id":26685117,"name":"pos","full_name":"grap/pos","owner":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grap/pos","description":"Point of sale","fork":true,"url":"https://api.github.com/repos/grap/pos","forks_url":"https://api.github.com/repos/grap/pos/forks","keys_url":"https://api.github.com/repos/grap/pos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grap/pos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grap/pos/teams","hooks_url":"https://api.github.com/repos/grap/pos/hooks","issue_events_url":"https://api.github.com/repos/grap/pos/issues/events{/number}","events_url":"https://api.github.com/repos/grap/pos/events","assignees_url":"https://api.github.com/repos/grap/pos/assignees{/user}","branches_url":"https://api.github.com/repos/grap/pos/branches{/branch}","tags_url":"https://api.github.com/repos/grap/pos/tags","blobs_url":"https://api.github.com/repos/grap/pos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grap/pos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grap/pos/git/refs{/sha}","trees_url":"https://api.github.com/repos/grap/pos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grap/pos/statuses/{sha}","languages_url":"https://api.github.com/repos/grap/pos/languages","stargazers_url":"https://api.github.com/repos/grap/pos/stargazers","contributors_url":"https://api.github.com/repos/grap/pos/contributors","subscribers_url":"https://api.github.com/repos/grap/pos/subscribers","subscription_url":"https://api.github.com/repos/grap/pos/subscription","commits_url":"https://api.github.com/repos/grap/pos/commits{/sha}","git_commits_url":"https://api.github.com/repos/grap/pos/git/commits{/sha}","comments_url":"https://api.github.com/repos/grap/pos/comments{/number}","issue_comment_url":"https://api.github.com/repos/grap/pos/issues/comments{/number}","contents_url":"https://api.github.com/repos/grap/pos/contents/{+path}","compare_url":"https://api.github.com/repos/grap/pos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grap/pos/merges","archive_url":"https://api.github.com/repos/grap/pos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grap/pos/downloads","issues_url":"https://api.github.com/repos/grap/pos/issues{/number}","pulls_url":"https://api.github.com/repos/grap/pos/pulls{/number}","milestones_url":"https://api.github.com/repos/grap/pos/milestones{/number}","notifications_url":"https://api.github.com/repos/grap/pos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grap/pos/labels{/name}","releases_url":"https://api.github.com/repos/grap/pos/releases{/id}","created_at":"2014-11-15T16:10:16Z","updated_at":"2014-10-08T15:22:35Z","pushed_at":"2015-03-10T17:15:09Z","git_url":"git://github.com/grap/pos.git","ssh_url":"git@github.com:grap/pos.git","clone_url":"https://github.com/grap/pos.git","svn_url":"https://github.com/grap/pos","homepage":null,"size":224,"stargazers_count":0,"watchers_count":0,"language":null,"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":"8.0"}},"base":{"label":"OCA:7.0","ref":"7.0","sha":"1843b2d516e4bf303f950590347c82505cf70cc2","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":24946822,"name":"pos","full_name":"OCA/pos","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/pos","description":"Odoo Point of sale Addons","fork":false,"url":"https://api.github.com/repos/OCA/pos","forks_url":"https://api.github.com/repos/OCA/pos/forks","keys_url":"https://api.github.com/repos/OCA/pos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/pos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/pos/teams","hooks_url":"https://api.github.com/repos/OCA/pos/hooks","issue_events_url":"https://api.github.com/repos/OCA/pos/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/pos/events","assignees_url":"https://api.github.com/repos/OCA/pos/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/pos/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/pos/tags","blobs_url":"https://api.github.com/repos/OCA/pos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/pos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/pos/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/pos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/pos/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/pos/languages","stargazers_url":"https://api.github.com/repos/OCA/pos/stargazers","contributors_url":"https://api.github.com/repos/OCA/pos/contributors","subscribers_url":"https://api.github.com/repos/OCA/pos/subscribers","subscription_url":"https://api.github.com/repos/OCA/pos/subscription","commits_url":"https://api.github.com/repos/OCA/pos/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/pos/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/pos/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/pos/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/pos/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/pos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/pos/merges","archive_url":"https://api.github.com/repos/OCA/pos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/pos/downloads","issues_url":"https://api.github.com/repos/OCA/pos/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/pos/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/pos/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/pos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/pos/labels{/name}","releases_url":"https://api.github.com/repos/OCA/pos/releases{/id}","created_at":"2014-10-08T15:22:35Z","updated_at":"2015-03-24T08:51:29Z","pushed_at":"2015-03-26T12:08:23Z","git_url":"git://github.com/OCA/pos.git","ssh_url":"git@github.com:OCA/pos.git","clone_url":"https://github.com/OCA/pos.git","svn_url":"https://github.com/OCA/pos","homepage":"http://odoo-community.org/project/59","size":698,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":4,"forks":22,"open_issues":4,"watchers":3,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/pos/pulls/17"},"html":{"href":"https://github.com/OCA/pos/pull/17"},"issue":{"href":"https://api.github.com/repos/OCA/pos/issues/17"},"comments":{"href":"https://api.github.com/repos/OCA/pos/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/pos/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/pos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/pos/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/pos/statuses/05573d753a3cd0f6e2caa479bf7f8fd8d05f314b"}}}}