From 721c1fe3256af0b4981be2d769d47b9a3b4a6f81 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Thu, 13 Jan 2011 18:11:59 +0100 Subject: [PATCH] [IMP] account: usabiltiy imp. bzr revid: qdp-launchpad@tinyerp.com-20110113171159-lvdat1nrexheeqc3 --- addons/account/account.py | 4 ++-- addons/account/account_move_line.py | 1 + addons/account/account_view.xml | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 2bbc3ffe7d2..212aaee26d5 100755 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -430,7 +430,7 @@ class account_account(osv.osv): _constraints = [ (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']), - (_check_type, 'You cannot create an account! \nMake sure if the account has children then it should be type "View"! ', ['type']), + (_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') @@ -2317,7 +2317,7 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'You cannot create an account template! \nMake sure if the account template has parent then it should be type "View"! ', ['type']), + (_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']), ] diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 125e5b57e7d..dfd6acdf7c3 100755 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -954,6 +954,7 @@ class account_move_line(osv.osv): if view_type == 'search' and result['fields'].get('journal_id', False): result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context) ctx = context.copy() + #we add the refunds journal in the selection field of journal if context.get('journal_type', False) == 'sale': ctx.update({'journal_type': 'sale_refund'}) result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 56620c887f1..a56d850a8e3 100755 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -170,6 +170,8 @@ + + @@ -179,7 +181,6 @@ -