{"action":"created","comment":{"url":"https://api.github.com/repos/KDVN/openerp7/pulls/comments/47199878","id":47199878,"diff_hunk":"@@ -312,7 +312,64 @@ def action_open_allocated_expense(self, cr, uid, ids, *args):\n #         else:\n #             res='PE'\n #         return res\n-#\n+#    \n+   \n+    def action_ge_create_ge_cash_advance(self, cr, uid, ids, *args): \n+        advance_buying='cash'\n+        name=''\n+        rValue = self.pool.get('kderp.advance.payment').new_code(cr, uid, [],3, name,advance_buying)['value']\n+        newcode = rValue.get('name', False)\n+        #pdb.set_trace()\n+        date=time.strftime('%Y-%m-%d')\n+        kderp_kspe_id = False\n+        for ge in self.browse(cr, uid, ids):\n+            if ge.advance_payment_id:\n+                return True  \n+            #pdb.set_trace()\n+            cash_details = []\n+            advance_cash= {\n+                    'advance_buying':advance_buying,\n+                    'name':newcode,\n+                    'type_cash':'payment',\n+                    'date':date,\n+                   \n+                    #'other_expense_ids':ge.id\n+                    \n+                   \n+                }\n+            kderp_kspe_id = self.pool.get('kderp.advance.payment').create(cr, uid, advance_cash)            \n+            ge.write({'advance_payment_id': kderp_kspe_id})  \n+            cr.execute(\"Select\\\n+                            name,\\\n+                            amount\\\n+                        from \\\n+                            kderp_other_expense_line koel\\\n+                        where expense_id=%s\" % (ge.id))\n+            for name,amount in cr.fetchall():\n+                if name<>'':\n+                    name=''\n+                else:\n+                    name=name\n+                cash={\n+                      'advance_id':kderp_kspe_id,\n+                      'name':name,\n+                      'amount':amount,\n+                      'date':date\n+                      }\n+                cash_details =self.pool.get('kderp.advance.payment.reimbursement.line').create(cr, uid, cash)             \n+        if kderp_kspe_id:   \n+            return {\n+                'type': 'ir.actions.act_window',\n+                'name': 'Supplier Payment (OExpense)',","path":"src/kderp_general_expense/kderp_general_expense.py","position":53,"original_position":53,"commit_id":"c78d58b782f96931ce32bdf5681b547990481d55","original_commit_id":"c78d58b782f96931ce32bdf5681b547990481d55","user":{"login":"dnt83","id":5275039,"avatar_url":"https://avatars.githubusercontent.com/u/5275039?v=3","gravatar_id":"","url":"https://api.github.com/users/dnt83","html_url":"https://github.com/dnt83","followers_url":"https://api.github.com/users/dnt83/followers","following_url":"https://api.github.com/users/dnt83/following{/other_user}","gists_url":"https://api.github.com/users/dnt83/gists{/gist_id}","starred_url":"https://api.github.com/users/dnt83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnt83/subscriptions","organizations_url":"https://api.github.com/users/dnt83/orgs","repos_url":"https://api.github.com/users/dnt83/repos","events_url":"https://api.github.com/users/dnt83/events{/privacy}","received_events_url":"https://api.github.com/users/dnt83/received_events","type":"User","site_admin":false},"body":"Sao lại là Supplier Payment .....","created_at":"2015-12-10T08:32:04Z","updated_at":"2015-12-10T08:32:04Z","html_url":"https://github.com/KDVN/openerp7/pull/64#discussion_r47199878","pull_request_url":"https://api.github.com/repos/KDVN/openerp7/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/comments/47199878"},"html":{"href":"https://github.com/KDVN/openerp7/pull/64#discussion_r47199878"},"pull_request":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/KDVN/openerp7/pulls/64","id":53224719,"html_url":"https://github.com/KDVN/openerp7/pull/64","diff_url":"https://github.com/KDVN/openerp7/pull/64.diff","patch_url":"https://github.com/KDVN/openerp7/pull/64.patch","issue_url":"https://api.github.com/repos/KDVN/openerp7/issues/64","number":64,"state":"open","locked":false,"title":"Chuyen action wizard cash advance sang module Kderp Advance Payment","user":{"login":"havt","id":7844216,"avatar_url":"https://avatars.githubusercontent.com/u/7844216?v=3","gravatar_id":"","url":"https://api.github.com/users/havt","html_url":"https://github.com/havt","followers_url":"https://api.github.com/users/havt/followers","following_url":"https://api.github.com/users/havt/following{/other_user}","gists_url":"https://api.github.com/users/havt/gists{/gist_id}","starred_url":"https://api.github.com/users/havt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havt/subscriptions","organizations_url":"https://api.github.com/users/havt/orgs","repos_url":"https://api.github.com/users/havt/repos","events_url":"https://api.github.com/users/havt/events{/privacy}","received_events_url":"https://api.github.com/users/havt/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-10T07:38:28Z","updated_at":"2015-12-10T08:32:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KDVN/openerp7/pulls/64/commits","review_comments_url":"https://api.github.com/repos/KDVN/openerp7/pulls/64/comments","review_comment_url":"https://api.github.com/repos/KDVN/openerp7/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KDVN/openerp7/issues/64/comments","statuses_url":"https://api.github.com/repos/KDVN/openerp7/statuses/c78d58b782f96931ce32bdf5681b547990481d55","head":{"label":"havt:oe7-develop","ref":"oe7-develop","sha":"c78d58b782f96931ce32bdf5681b547990481d55","user":{"login":"havt","id":7844216,"avatar_url":"https://avatars.githubusercontent.com/u/7844216?v=3","gravatar_id":"","url":"https://api.github.com/users/havt","html_url":"https://github.com/havt","followers_url":"https://api.github.com/users/havt/followers","following_url":"https://api.github.com/users/havt/following{/other_user}","gists_url":"https://api.github.com/users/havt/gists{/gist_id}","starred_url":"https://api.github.com/users/havt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havt/subscriptions","organizations_url":"https://api.github.com/users/havt/orgs","repos_url":"https://api.github.com/users/havt/repos","events_url":"https://api.github.com/users/havt/events{/privacy}","received_events_url":"https://api.github.com/users/havt/received_events","type":"User","site_admin":false},"repo":{"id":44219185,"name":"openerp7","full_name":"havt/openerp7","owner":{"login":"havt","id":7844216,"avatar_url":"https://avatars.githubusercontent.com/u/7844216?v=3","gravatar_id":"","url":"https://api.github.com/users/havt","html_url":"https://github.com/havt","followers_url":"https://api.github.com/users/havt/followers","following_url":"https://api.github.com/users/havt/following{/other_user}","gists_url":"https://api.github.com/users/havt/gists{/gist_id}","starred_url":"https://api.github.com/users/havt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havt/subscriptions","organizations_url":"https://api.github.com/users/havt/orgs","repos_url":"https://api.github.com/users/havt/repos","events_url":"https://api.github.com/users/havt/events{/privacy}","received_events_url":"https://api.github.com/users/havt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/havt/openerp7","description":"OpenERP 7 Addons for Kinden Vietnam","fork":true,"url":"https://api.github.com/repos/havt/openerp7","forks_url":"https://api.github.com/repos/havt/openerp7/forks","keys_url":"https://api.github.com/repos/havt/openerp7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/havt/openerp7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/havt/openerp7/teams","hooks_url":"https://api.github.com/repos/havt/openerp7/hooks","issue_events_url":"https://api.github.com/repos/havt/openerp7/issues/events{/number}","events_url":"https://api.github.com/repos/havt/openerp7/events","assignees_url":"https://api.github.com/repos/havt/openerp7/assignees{/user}","branches_url":"https://api.github.com/repos/havt/openerp7/branches{/branch}","tags_url":"https://api.github.com/repos/havt/openerp7/tags","blobs_url":"https://api.github.com/repos/havt/openerp7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/havt/openerp7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/havt/openerp7/git/refs{/sha}","trees_url":"https://api.github.com/repos/havt/openerp7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/havt/openerp7/statuses/{sha}","languages_url":"https://api.github.com/repos/havt/openerp7/languages","stargazers_url":"https://api.github.com/repos/havt/openerp7/stargazers","contributors_url":"https://api.github.com/repos/havt/openerp7/contributors","subscribers_url":"https://api.github.com/repos/havt/openerp7/subscribers","subscription_url":"https://api.github.com/repos/havt/openerp7/subscription","commits_url":"https://api.github.com/repos/havt/openerp7/commits{/sha}","git_commits_url":"https://api.github.com/repos/havt/openerp7/git/commits{/sha}","comments_url":"https://api.github.com/repos/havt/openerp7/comments{/number}","issue_comment_url":"https://api.github.com/repos/havt/openerp7/issues/comments{/number}","contents_url":"https://api.github.com/repos/havt/openerp7/contents/{+path}","compare_url":"https://api.github.com/repos/havt/openerp7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/havt/openerp7/merges","archive_url":"https://api.github.com/repos/havt/openerp7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/havt/openerp7/downloads","issues_url":"https://api.github.com/repos/havt/openerp7/issues{/number}","pulls_url":"https://api.github.com/repos/havt/openerp7/pulls{/number}","milestones_url":"https://api.github.com/repos/havt/openerp7/milestones{/number}","notifications_url":"https://api.github.com/repos/havt/openerp7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/havt/openerp7/labels{/name}","releases_url":"https://api.github.com/repos/havt/openerp7/releases{/id}","created_at":"2015-10-14T02:31:01Z","updated_at":"2015-10-14T02:31:12Z","pushed_at":"2015-12-10T07:35:20Z","git_url":"git://github.com/havt/openerp7.git","ssh_url":"git@github.com:havt/openerp7.git","clone_url":"https://github.com/havt/openerp7.git","svn_url":"https://github.com/havt/openerp7","homepage":"","size":139348,"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":"oe7-develop"}},"base":{"label":"KDVN:oe7-develop","ref":"oe7-develop","sha":"c2921f6b5827f8387a3ca2bda552cef1cd70b0dd","user":{"login":"KDVN","id":7839172,"avatar_url":"https://avatars.githubusercontent.com/u/7839172?v=3","gravatar_id":"","url":"https://api.github.com/users/KDVN","html_url":"https://github.com/KDVN","followers_url":"https://api.github.com/users/KDVN/followers","following_url":"https://api.github.com/users/KDVN/following{/other_user}","gists_url":"https://api.github.com/users/KDVN/gists{/gist_id}","starred_url":"https://api.github.com/users/KDVN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDVN/subscriptions","organizations_url":"https://api.github.com/users/KDVN/orgs","repos_url":"https://api.github.com/users/KDVN/repos","events_url":"https://api.github.com/users/KDVN/events{/privacy}","received_events_url":"https://api.github.com/users/KDVN/received_events","type":"Organization","site_admin":false},"repo":{"id":28074962,"name":"openerp7","full_name":"KDVN/openerp7","owner":{"login":"KDVN","id":7839172,"avatar_url":"https://avatars.githubusercontent.com/u/7839172?v=3","gravatar_id":"","url":"https://api.github.com/users/KDVN","html_url":"https://github.com/KDVN","followers_url":"https://api.github.com/users/KDVN/followers","following_url":"https://api.github.com/users/KDVN/following{/other_user}","gists_url":"https://api.github.com/users/KDVN/gists{/gist_id}","starred_url":"https://api.github.com/users/KDVN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDVN/subscriptions","organizations_url":"https://api.github.com/users/KDVN/orgs","repos_url":"https://api.github.com/users/KDVN/repos","events_url":"https://api.github.com/users/KDVN/events{/privacy}","received_events_url":"https://api.github.com/users/KDVN/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KDVN/openerp7","description":"OpenERP 7 Addons for Kinden Vietnam","fork":false,"url":"https://api.github.com/repos/KDVN/openerp7","forks_url":"https://api.github.com/repos/KDVN/openerp7/forks","keys_url":"https://api.github.com/repos/KDVN/openerp7/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KDVN/openerp7/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KDVN/openerp7/teams","hooks_url":"https://api.github.com/repos/KDVN/openerp7/hooks","issue_events_url":"https://api.github.com/repos/KDVN/openerp7/issues/events{/number}","events_url":"https://api.github.com/repos/KDVN/openerp7/events","assignees_url":"https://api.github.com/repos/KDVN/openerp7/assignees{/user}","branches_url":"https://api.github.com/repos/KDVN/openerp7/branches{/branch}","tags_url":"https://api.github.com/repos/KDVN/openerp7/tags","blobs_url":"https://api.github.com/repos/KDVN/openerp7/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KDVN/openerp7/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KDVN/openerp7/git/refs{/sha}","trees_url":"https://api.github.com/repos/KDVN/openerp7/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KDVN/openerp7/statuses/{sha}","languages_url":"https://api.github.com/repos/KDVN/openerp7/languages","stargazers_url":"https://api.github.com/repos/KDVN/openerp7/stargazers","contributors_url":"https://api.github.com/repos/KDVN/openerp7/contributors","subscribers_url":"https://api.github.com/repos/KDVN/openerp7/subscribers","subscription_url":"https://api.github.com/repos/KDVN/openerp7/subscription","commits_url":"https://api.github.com/repos/KDVN/openerp7/commits{/sha}","git_commits_url":"https://api.github.com/repos/KDVN/openerp7/git/commits{/sha}","comments_url":"https://api.github.com/repos/KDVN/openerp7/comments{/number}","issue_comment_url":"https://api.github.com/repos/KDVN/openerp7/issues/comments{/number}","contents_url":"https://api.github.com/repos/KDVN/openerp7/contents/{+path}","compare_url":"https://api.github.com/repos/KDVN/openerp7/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KDVN/openerp7/merges","archive_url":"https://api.github.com/repos/KDVN/openerp7/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KDVN/openerp7/downloads","issues_url":"https://api.github.com/repos/KDVN/openerp7/issues{/number}","pulls_url":"https://api.github.com/repos/KDVN/openerp7/pulls{/number}","milestones_url":"https://api.github.com/repos/KDVN/openerp7/milestones{/number}","notifications_url":"https://api.github.com/repos/KDVN/openerp7/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KDVN/openerp7/labels{/name}","releases_url":"https://api.github.com/repos/KDVN/openerp7/releases{/id}","created_at":"2014-12-16T07:05:22Z","updated_at":"2015-09-16T07:43:18Z","pushed_at":"2015-12-10T07:38:28Z","git_url":"git://github.com/KDVN/openerp7.git","ssh_url":"git@github.com:KDVN/openerp7.git","clone_url":"https://github.com/KDVN/openerp7.git","svn_url":"https://github.com/KDVN/openerp7","homepage":"","size":139327,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"oe7-develop"}},"_links":{"self":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/64"},"html":{"href":"https://github.com/KDVN/openerp7/pull/64"},"issue":{"href":"https://api.github.com/repos/KDVN/openerp7/issues/64"},"comments":{"href":"https://api.github.com/repos/KDVN/openerp7/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KDVN/openerp7/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/KDVN/openerp7/statuses/c78d58b782f96931ce32bdf5681b547990481d55"}}}}