{"action":"opened","number":28789,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/28789","id":231940772,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxOTQwNzcy","html_url":"https://github.com/odoo/odoo/pull/28789","diff_url":"https://github.com/odoo/odoo/pull/28789.diff","patch_url":"https://github.com/odoo/odoo/pull/28789.patch","issue_url":"https://api.github.com/repos/odoo/odoo/issues/28789","number":28789,"state":"open","locked":false,"title":"[FIX] Use COA's transfer_account_code_prefix on creating transfer acc…","user":{"login":"yelizariev","id":186131,"node_id":"MDQ6VXNlcjE4NjEzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/186131?v=4","gravatar_id":"","url":"https://api.github.com/users/yelizariev","html_url":"https://github.com/yelizariev","followers_url":"https://api.github.com/users/yelizariev/followers","following_url":"https://api.github.com/users/yelizariev/following{/other_user}","gists_url":"https://api.github.com/users/yelizariev/gists{/gist_id}","starred_url":"https://api.github.com/users/yelizariev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yelizariev/subscriptions","organizations_url":"https://api.github.com/users/yelizariev/orgs","repos_url":"https://api.github.com/users/yelizariev/repos","events_url":"https://api.github.com/users/yelizariev/events{/privacy}","received_events_url":"https://api.github.com/users/yelizariev/received_events","type":"User","site_admin":false},"body":"\r\n**Description of the issue/feature this PR addresses:**\r\n\r\nWe dived into accounting and found this strange behaviour:\r\n\r\nTransfer accounts created for payment acquires ignore **Prefix of the main transfer accounts** and always create accounts with code 000001, 000002, etc.\r\n\r\nThe reason for that is that ``_prepare_transfer_account_for_direct_creation`` [is called with Empty RecordSet](https://github.com/odoo/odoo/blob/43b63a04656276926dfecd65d3058d6464ee8ac5/addons/payment/models/payment_acquirer.py#L232), so [transfer_account_code_prefix becomes empty](https://github.com/odoo/odoo/blob/43b63a04656276926dfecd65d3058d6464ee8ac5/addons/account/models/chart_template.py#L366)\r\n\r\nThis behaviour was introduced recently in https://github.com/odoo/odoo/commit/87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639 by @oco-odoo. Before that commit, Account Chart Template is computed in ``default_get`` method.\r\n**Current behavior before PR:**\r\n\r\n**Prefix of the main transfer accounts** is ignored on creating Journal accoutns for Payment Acquire \r\n\r\n**Desired behavior after PR is merged:**\r\n\r\nTry to use Account Chart Template\r\n\r\n\r\n\r\n@it-projects-llc\r\n\r\n--\r\nI confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr\r\n","created_at":"2018-11-19T11:32:51Z","updated_at":"2018-11-19T11:32:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/odoo/odoo/pulls/28789/commits","review_comments_url":"https://api.github.com/repos/odoo/odoo/pulls/28789/comments","review_comment_url":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/28789/comments","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/3adf878da11951ce2e53ca4e97be6a6a072a83fb","head":{"label":"yelizariev:patch-21","ref":"patch-21","sha":"3adf878da11951ce2e53ca4e97be6a6a072a83fb","user":{"login":"yelizariev","id":186131,"node_id":"MDQ6VXNlcjE4NjEzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/186131?v=4","gravatar_id":"","url":"https://api.github.com/users/yelizariev","html_url":"https://github.com/yelizariev","followers_url":"https://api.github.com/users/yelizariev/followers","following_url":"https://api.github.com/users/yelizariev/following{/other_user}","gists_url":"https://api.github.com/users/yelizariev/gists{/gist_id}","starred_url":"https://api.github.com/users/yelizariev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yelizariev/subscriptions","organizations_url":"https://api.github.com/users/yelizariev/orgs","repos_url":"https://api.github.com/users/yelizariev/repos","events_url":"https://api.github.com/users/yelizariev/events{/privacy}","received_events_url":"https://api.github.com/users/yelizariev/received_events","type":"User","site_admin":false},"repo":{"id":21784112,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc4NDExMg==","name":"odoo","full_name":"yelizariev/odoo","private":false,"owner":{"login":"yelizariev","id":186131,"node_id":"MDQ6VXNlcjE4NjEzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/186131?v=4","gravatar_id":"","url":"https://api.github.com/users/yelizariev","html_url":"https://github.com/yelizariev","followers_url":"https://api.github.com/users/yelizariev/followers","following_url":"https://api.github.com/users/yelizariev/following{/other_user}","gists_url":"https://api.github.com/users/yelizariev/gists{/gist_id}","starred_url":"https://api.github.com/users/yelizariev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yelizariev/subscriptions","organizations_url":"https://api.github.com/users/yelizariev/orgs","repos_url":"https://api.github.com/users/yelizariev/repos","events_url":"https://api.github.com/users/yelizariev/events{/privacy}","received_events_url":"https://api.github.com/users/yelizariev/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yelizariev/odoo","description":"Odoo (formerly OpenERP). Open Source Business Apps.","fork":true,"url":"https://api.github.com/repos/yelizariev/odoo","forks_url":"https://api.github.com/repos/yelizariev/odoo/forks","keys_url":"https://api.github.com/repos/yelizariev/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yelizariev/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yelizariev/odoo/teams","hooks_url":"https://api.github.com/repos/yelizariev/odoo/hooks","issue_events_url":"https://api.github.com/repos/yelizariev/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/yelizariev/odoo/events","assignees_url":"https://api.github.com/repos/yelizariev/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/yelizariev/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/yelizariev/odoo/tags","blobs_url":"https://api.github.com/repos/yelizariev/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yelizariev/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yelizariev/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/yelizariev/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yelizariev/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/yelizariev/odoo/languages","stargazers_url":"https://api.github.com/repos/yelizariev/odoo/stargazers","contributors_url":"https://api.github.com/repos/yelizariev/odoo/contributors","subscribers_url":"https://api.github.com/repos/yelizariev/odoo/subscribers","subscription_url":"https://api.github.com/repos/yelizariev/odoo/subscription","commits_url":"https://api.github.com/repos/yelizariev/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/yelizariev/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/yelizariev/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/yelizariev/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/yelizariev/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/yelizariev/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yelizariev/odoo/merges","archive_url":"https://api.github.com/repos/yelizariev/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yelizariev/odoo/downloads","issues_url":"https://api.github.com/repos/yelizariev/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/yelizariev/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/yelizariev/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/yelizariev/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yelizariev/odoo/labels{/name}","releases_url":"https://api.github.com/repos/yelizariev/odoo/releases{/id}","deployments_url":"https://api.github.com/repos/yelizariev/odoo/deployments","created_at":"2014-07-13T06:05:06Z","updated_at":"2015-09-27T13:06:52Z","pushed_at":"2018-11-19T11:23:33Z","git_url":"git://github.com/yelizariev/odoo.git","ssh_url":"git@github.com:yelizariev/odoo.git","clone_url":"https://github.com/yelizariev/odoo.git","svn_url":"https://github.com/yelizariev/odoo","homepage":"https://www.odoo.com","size":2360021,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"odoo:12.0","ref":"12.0","sha":"7765689f63b50f6e292db704fe1182548416aa49","user":{"login":"odoo","id":6368483,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjg0ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/6368483?v=4","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":19745004,"node_id":"MDEwOlJlcG9zaXRvcnkxOTc0NTAwNA==","name":"odoo","full_name":"odoo/odoo","private":false,"owner":{"login":"odoo","id":6368483,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjg0ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/6368483?v=4","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/odoo/odoo","description":"Odoo. Open Source Apps To Grow Your Business.","fork":false,"url":"https://api.github.com/repos/odoo/odoo","forks_url":"https://api.github.com/repos/odoo/odoo/forks","keys_url":"https://api.github.com/repos/odoo/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/odoo/teams","hooks_url":"https://api.github.com/repos/odoo/odoo/hooks","issue_events_url":"https://api.github.com/repos/odoo/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/odoo/events","assignees_url":"https://api.github.com/repos/odoo/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/odoo/tags","blobs_url":"https://api.github.com/repos/odoo/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/odoo/languages","stargazers_url":"https://api.github.com/repos/odoo/odoo/stargazers","contributors_url":"https://api.github.com/repos/odoo/odoo/contributors","subscribers_url":"https://api.github.com/repos/odoo/odoo/subscribers","subscription_url":"https://api.github.com/repos/odoo/odoo/subscription","commits_url":"https://api.github.com/repos/odoo/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoo/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/odoo/merges","archive_url":"https://api.github.com/repos/odoo/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/odoo/downloads","issues_url":"https://api.github.com/repos/odoo/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/odoo/labels{/name}","releases_url":"https://api.github.com/repos/odoo/odoo/releases{/id}","deployments_url":"https://api.github.com/repos/odoo/odoo/deployments","created_at":"2014-05-13T15:38:58Z","updated_at":"2018-11-19T11:09:15Z","pushed_at":"2018-11-19T11:26:26Z","git_url":"git://github.com/odoo/odoo.git","ssh_url":"git@github.com:odoo/odoo.git","clone_url":"https://github.com/odoo/odoo.git","svn_url":"https://github.com/odoo/odoo","homepage":"https://www.odoo.com","size":2383907,"stargazers_count":11730,"watchers_count":11730,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9147,"mirror_url":null,"archived":false,"open_issues_count":2007,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9147,"open_issues":2007,"watchers":11730,"default_branch":"12.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/28789"},"html":{"href":"https://github.com/odoo/odoo/pull/28789"},"issue":{"href":"https://api.github.com/repos/odoo/odoo/issues/28789"},"comments":{"href":"https://api.github.com/repos/odoo/odoo/issues/28789/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/odoo/pulls/28789/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoo/odoo/pulls/28789/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/odoo/statuses/3adf878da11951ce2e53ca4e97be6a6a072a83fb"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"yelizariev"}}