{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/comments/27304329","id":27304329,"diff_hunk":"@@ -67,15 +66,15 @@ def _is_generate_bvr(self, cr, uid, invoice, context=None):\n         return (invoice.partner_bank_id and\n                 invoice.partner_bank_id.state == 'bvr')\n \n-    def _compute_bvr_ref(self, cr, uid, move_line, context=None):\n+    def _compute_bvr_ref(self, cr, uid, move_line,\n+                         sequence_int=0, context=None):\n         ''' Default BVR reference computation '''\n         res = ''\n         if move_line.invoice.partner_bank_id.bvr_adherent_num:\n             res = move_line.invoice.partner_bank_id.bvr_adherent_num\n-        move_number = ''\n-\n+        move_number = str(sequence_int)\n         if move_line.invoice.number:\n-            compound = str(move_line.invoice.number) + str(move_line.id)\n+            compound = str(move_line.invoice.number) + str(sequence_int)","path":"l10n_ch_payment_slip/invoice.py","position":45,"original_position":45,"commit_id":"f64972adc83b3646a50ac61fc4b17fd459bf57af","original_commit_id":"f64972adc83b3646a50ac61fc4b17fd459bf57af","user":{"login":"guewen","id":417223,"avatar_url":"https://avatars.githubusercontent.com/u/417223?v=3","gravatar_id":"","url":"https://api.github.com/users/guewen","html_url":"https://github.com/guewen","followers_url":"https://api.github.com/users/guewen/followers","following_url":"https://api.github.com/users/guewen/following{/other_user}","gists_url":"https://api.github.com/users/guewen/gists{/gist_id}","starred_url":"https://api.github.com/users/guewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guewen/subscriptions","organizations_url":"https://api.github.com/users/guewen/orgs","repos_url":"https://api.github.com/users/guewen/repos","events_url":"https://api.github.com/users/guewen/events{/privacy}","received_events_url":"https://api.github.com/users/guewen/received_events","type":"User","site_admin":false},"body":"Can you explain why it is better to use this `sequence_int` instead of `move_line.id`, in a comment maybe? I don't understand it.","created_at":"2015-03-27T15:41:44Z","updated_at":"2015-03-27T15:41:44Z","html_url":"https://github.com/OCA/l10n-switzerland/pull/118#discussion_r27304329","pull_request_url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/comments/27304329"},"html":{"href":"https://github.com/OCA/l10n-switzerland/pull/118#discussion_r27304329"},"pull_request":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118","id":32091984,"html_url":"https://github.com/OCA/l10n-switzerland/pull/118","diff_url":"https://github.com/OCA/l10n-switzerland/pull/118.diff","patch_url":"https://github.com/OCA/l10n-switzerland/pull/118.patch","issue_url":"https://api.github.com/repos/OCA/l10n-switzerland/issues/118","number":118,"state":"open","locked":false,"title":"[FIX] Preserve move transaction_ref, when you cancel and reopen an invoi...","user":{"login":"vrenaville","id":355215,"avatar_url":"https://avatars.githubusercontent.com/u/355215?v=3","gravatar_id":"","url":"https://api.github.com/users/vrenaville","html_url":"https://github.com/vrenaville","followers_url":"https://api.github.com/users/vrenaville/followers","following_url":"https://api.github.com/users/vrenaville/following{/other_user}","gists_url":"https://api.github.com/users/vrenaville/gists{/gist_id}","starred_url":"https://api.github.com/users/vrenaville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrenaville/subscriptions","organizations_url":"https://api.github.com/users/vrenaville/orgs","repos_url":"https://api.github.com/users/vrenaville/repos","events_url":"https://api.github.com/users/vrenaville/events{/privacy}","received_events_url":"https://api.github.com/users/vrenaville/received_events","type":"User","site_admin":false},"body":"This fix prevent transaction_ref to have a different number \r\nwhen you cancel and reopen an invoice.\r\nThe problem occurs if you have already sent to your customer the BVR report, so I will pay you with a wrong reference and matching payment will not been done automatically.\r\nI have use a sequence counter to numerate line for multiple payment term in order to have a different reference for each terms.\r\n\r\n@nbessi your review on this one will be highly  appreciate \r\n","created_at":"2015-03-27T09:07:57Z","updated_at":"2015-03-27T15:41:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96bf43ee6b9b23396bc0eb962406a40953a08e73","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118/commits","review_comments_url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118/comments","review_comment_url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/l10n-switzerland/issues/118/comments","statuses_url":"https://api.github.com/repos/OCA/l10n-switzerland/statuses/f64972adc83b3646a50ac61fc4b17fd459bf57af","head":{"label":"vrenaville:fix_transaction_ref_cancel_reopen","ref":"fix_transaction_ref_cancel_reopen","sha":"f64972adc83b3646a50ac61fc4b17fd459bf57af","user":{"login":"vrenaville","id":355215,"avatar_url":"https://avatars.githubusercontent.com/u/355215?v=3","gravatar_id":"","url":"https://api.github.com/users/vrenaville","html_url":"https://github.com/vrenaville","followers_url":"https://api.github.com/users/vrenaville/followers","following_url":"https://api.github.com/users/vrenaville/following{/other_user}","gists_url":"https://api.github.com/users/vrenaville/gists{/gist_id}","starred_url":"https://api.github.com/users/vrenaville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrenaville/subscriptions","organizations_url":"https://api.github.com/users/vrenaville/orgs","repos_url":"https://api.github.com/users/vrenaville/repos","events_url":"https://api.github.com/users/vrenaville/events{/privacy}","received_events_url":"https://api.github.com/users/vrenaville/received_events","type":"User","site_admin":false},"repo":{"id":25911929,"name":"l10n-switzerland","full_name":"vrenaville/l10n-switzerland","owner":{"login":"vrenaville","id":355215,"avatar_url":"https://avatars.githubusercontent.com/u/355215?v=3","gravatar_id":"","url":"https://api.github.com/users/vrenaville","html_url":"https://github.com/vrenaville","followers_url":"https://api.github.com/users/vrenaville/followers","following_url":"https://api.github.com/users/vrenaville/following{/other_user}","gists_url":"https://api.github.com/users/vrenaville/gists{/gist_id}","starred_url":"https://api.github.com/users/vrenaville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrenaville/subscriptions","organizations_url":"https://api.github.com/users/vrenaville/orgs","repos_url":"https://api.github.com/users/vrenaville/repos","events_url":"https://api.github.com/users/vrenaville/events{/privacy}","received_events_url":"https://api.github.com/users/vrenaville/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vrenaville/l10n-switzerland","description":"","fork":true,"url":"https://api.github.com/repos/vrenaville/l10n-switzerland","forks_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/forks","keys_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/teams","hooks_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/hooks","issue_events_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/issues/events{/number}","events_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/events","assignees_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/assignees{/user}","branches_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/branches{/branch}","tags_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/tags","blobs_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/git/refs{/sha}","trees_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/statuses/{sha}","languages_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/languages","stargazers_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/stargazers","contributors_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/contributors","subscribers_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/subscribers","subscription_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/subscription","commits_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/commits{/sha}","git_commits_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/git/commits{/sha}","comments_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/comments{/number}","issue_comment_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/issues/comments{/number}","contents_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/contents/{+path}","compare_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/merges","archive_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/downloads","issues_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/issues{/number}","pulls_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/pulls{/number}","milestones_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/milestones{/number}","notifications_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/labels{/name}","releases_url":"https://api.github.com/repos/vrenaville/l10n-switzerland/releases{/id}","created_at":"2014-10-29T08:45:36Z","updated_at":"2014-10-23T08:31:36Z","pushed_at":"2015-03-27T09:03:18Z","git_url":"git://github.com/vrenaville/l10n-switzerland.git","ssh_url":"git@github.com:vrenaville/l10n-switzerland.git","clone_url":"https://github.com/vrenaville/l10n-switzerland.git","svn_url":"https://github.com/vrenaville/l10n-switzerland","homepage":null,"size":4407,"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":"7aa9f2fbfdc570e742b909b9484886755eeb05b4","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":20523954,"name":"l10n-switzerland","full_name":"OCA/l10n-switzerland","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/l10n-switzerland","description":"Odoo Swiss localization","fork":false,"url":"https://api.github.com/repos/OCA/l10n-switzerland","forks_url":"https://api.github.com/repos/OCA/l10n-switzerland/forks","keys_url":"https://api.github.com/repos/OCA/l10n-switzerland/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/l10n-switzerland/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/l10n-switzerland/teams","hooks_url":"https://api.github.com/repos/OCA/l10n-switzerland/hooks","issue_events_url":"https://api.github.com/repos/OCA/l10n-switzerland/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/l10n-switzerland/events","assignees_url":"https://api.github.com/repos/OCA/l10n-switzerland/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/l10n-switzerland/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/l10n-switzerland/tags","blobs_url":"https://api.github.com/repos/OCA/l10n-switzerland/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/l10n-switzerland/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/l10n-switzerland/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/l10n-switzerland/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/l10n-switzerland/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/l10n-switzerland/languages","stargazers_url":"https://api.github.com/repos/OCA/l10n-switzerland/stargazers","contributors_url":"https://api.github.com/repos/OCA/l10n-switzerland/contributors","subscribers_url":"https://api.github.com/repos/OCA/l10n-switzerland/subscribers","subscription_url":"https://api.github.com/repos/OCA/l10n-switzerland/subscription","commits_url":"https://api.github.com/repos/OCA/l10n-switzerland/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/l10n-switzerland/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/l10n-switzerland/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/l10n-switzerland/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/l10n-switzerland/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/l10n-switzerland/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/l10n-switzerland/merges","archive_url":"https://api.github.com/repos/OCA/l10n-switzerland/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/l10n-switzerland/downloads","issues_url":"https://api.github.com/repos/OCA/l10n-switzerland/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/l10n-switzerland/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/l10n-switzerland/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/l10n-switzerland/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/l10n-switzerland/labels{/name}","releases_url":"https://api.github.com/repos/OCA/l10n-switzerland/releases{/id}","created_at":"2014-06-05T12:24:52Z","updated_at":"2015-03-27T15:26:58Z","pushed_at":"2015-03-27T15:27:01Z","git_url":"git://github.com/OCA/l10n-switzerland.git","ssh_url":"git@github.com:OCA/l10n-switzerland.git","clone_url":"https://github.com/OCA/l10n-switzerland.git","svn_url":"https://github.com/OCA/l10n-switzerland","homepage":"","size":7021,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":19,"forks":29,"open_issues":19,"watchers":12,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118"},"html":{"href":"https://github.com/OCA/l10n-switzerland/pull/118"},"issue":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/issues/118"},"comments":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/l10n-switzerland/statuses/f64972adc83b3646a50ac61fc4b17fd459bf57af"}}}}