← Back to team overview

openerp-expert-accounting team mailing list archive

[Bug 535109] Re: An accounting account of type other than view, having entries related to it, is allowed to change to internal type view

 

Jay, I think the fix is wrong. This is not the right thing to do:

  "The patch won't allow the change of type in following conditions:
  1. If the account with its children(if any) have any entries and old type is in Group1, goes to new type in Group2.
  2. If the account with its children(if any) have any entries and old type is in Group2, goes to new type in Group1.
  3. If the account with its children(if any) have any entries and old type is Closed and new type is other than 'Closed'."

Instead it should do this:

  "The patch won't allow the change of type in following conditions:
  1. If the account have any entries and old type is in Group1, goes to new type in Group2.
  2. If the account with its children(if any) have any entries and old type is in Group2, goes to new type in Group1.
  3. If the account with its children(if any) have any entries and old type is Closed and new type is other than 'Closed'."


As an example, we just got into this problem:

One client has some accounts like these:

Code            Type          Has moves           Parent code
572               other         no                        57
57200001     other         yes                       572

The account 572 has type "other" due to an error, in the Spanish Chart of Accounts Template, that was fixed long ago (though after the client created the accounts). We are trying to update the chart of accounts with the last template version (using the account_chart_update module [we will release an improved version of this module today]), but when we try to 'fix' the 572 account, by setting it's type to view, it will fail with a (wrong) message:
 "You cannot change the type of account from 'other' to 'view' type as it contains account entries"

That message is wrong, is not the account the one with moves, but its children. 
So, ok, it shouldn't let the user change the type of the account "57200001", but IMHO the "572" account should be allowed to change type, so if the user makes a mistake, and leaves a non-leaf account with a type different from 'view', he can fix the account latter.

Plus, a proper message should be shown (the current message states that
the problem is the account having entries, not "the account or its
children").

-- 
An accounting account of type other than view, having entries related to it, is allowed to change to internal type view
https://bugs.launchpad.net/bugs/535109
You received this bug notification because you are a member of OpenERP
Accounting Experts, which is a direct subscriber.

Status in OpenObject Addons Modules: Fix Released

Bug description:
Go to:
Financial Management
  Configuration
   Financial Accounting
    Financial Accounts
     List of Accounts

Find an account which has entries related to it, meaning there are entries which use this account.
Let change the internal type this account has, being it other than view, receivable, payable, other, etc. and change it to view, save.

I think this behaivour is not right, it should not be allowed to change accounts with entries related to it