{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/9096","labels_url":"https://api.github.com/repos/odoo/odoo/issues/9096/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/9096/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/9096/events","html_url":"https://github.com/odoo/odoo/issues/9096","id":111757980,"number":9096,"title":"[9.0] hr_payroll_account - Journal Items wrong allocated -> [Solved]","user":{"login":"elperrofarelo","id":9564408,"avatar_url":"https://avatars.githubusercontent.com/u/9564408?v=3","gravatar_id":"","url":"https://api.github.com/users/elperrofarelo","html_url":"https://github.com/elperrofarelo","followers_url":"https://api.github.com/users/elperrofarelo/followers","following_url":"https://api.github.com/users/elperrofarelo/following{/other_user}","gists_url":"https://api.github.com/users/elperrofarelo/gists{/gist_id}","starred_url":"https://api.github.com/users/elperrofarelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elperrofarelo/subscriptions","organizations_url":"https://api.github.com/users/elperrofarelo/orgs","repos_url":"https://api.github.com/users/elperrofarelo/repos","events_url":"https://api.github.com/users/elperrofarelo/events{/privacy}","received_events_url":"https://api.github.com/users/elperrofarelo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-16T04:38:49Z","updated_at":"2015-10-29T04:21:27Z","closed_at":null,"body":"All salary lines are allocated after confirm the pay slip in journal as a Debit, although the salary rule has only a Credit Account defined and no Debit Account.\r\n\r\nThe Bank Adjustment Entry is therefore wrong calculated.\r\n\r\n![1](https://cloud.githubusercontent.com/assets/9564408/10533962/82144c9c-73d0-11e5-9035-fa7a1a525df8.jpg)\r\n![2](https://cloud.githubusercontent.com/assets/9564408/10533963/86009c5c-73d0-11e5-94f1-208800652a0d.jpg)\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/152072453","html_url":"https://github.com/odoo/odoo/issues/9096#issuecomment-152072453","issue_url":"https://api.github.com/repos/odoo/odoo/issues/9096","id":152072453,"user":{"login":"elperrofarelo","id":9564408,"avatar_url":"https://avatars.githubusercontent.com/u/9564408?v=3","gravatar_id":"","url":"https://api.github.com/users/elperrofarelo","html_url":"https://github.com/elperrofarelo","followers_url":"https://api.github.com/users/elperrofarelo/followers","following_url":"https://api.github.com/users/elperrofarelo/following{/other_user}","gists_url":"https://api.github.com/users/elperrofarelo/gists{/gist_id}","starred_url":"https://api.github.com/users/elperrofarelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elperrofarelo/subscriptions","organizations_url":"https://api.github.com/users/elperrofarelo/orgs","repos_url":"https://api.github.com/users/elperrofarelo/repos","events_url":"https://api.github.com/users/elperrofarelo/events{/privacy}","received_events_url":"https://api.github.com/users/elperrofarelo/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T04:21:27Z","updated_at":"2015-10-29T04:21:27Z","body":"Credit and debit are wrong calculated in hr_payslip_account\r\nIst:\r\n                if credit_account_id:\r\n                    credit_line = (0, 0, {\r\n                         'name': line.name,\r\n                        'partner_id': hr_payslip_line_pool._get_partner_id(cr, uid, line, credit_account=True, context=context),\r\n                        'account_id': credit_account_id,\r\n                        'journal_id': slip.journal_id.id,\r\n                        'date': date,\r\n                        'debit': amt < 0.0 and -amt or 0.0,\r\n                        'credit': amt > 0.0 and amt or 0.0,\r\n                        'analytic_account_id': line.salary_rule_id.analytic_account_id and line.salary_rule_id.analytic_account_id.id or False,\r\n                        'tax_line_id': line.salary_rule_id.account_tax_id and line.salary_rule_id.account_tax_id.id or False,\r\n                    })\r\n\r\nSolution:\r\n                        'credit': amt < 0.0 and -amt or 0.0,\r\n                        'debit': amt > 0.0 and amt or 0.0,\r\nDebit and Credit must be changed"}}