openerp-expert-accounting team mailing list archive
-
openerp-expert-accounting team
-
Mailing list archive
-
Message #00565
Re: [Bug 535109] Re: An accounting account of type other than view, having entries related to it, is allowed to change to internal type view
I just noticed one problem with the proposed (and applied) solution:
If you have a parent account with a non-'view' type (yeah, it is an
error to have such account), and any of its children accounts have
movements, you can't fix it!: You can no longer set its type to the
correct one ('view').
In more words:
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), 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").
--
Borja López Soilán
borjals@xxxxxxxxx
Pexego Sistemas Informáticos S.L.
Avenida de Magoi 66 - 27002 Lugo (España)
Tel./Fax 982801517
http://www.pexego.es
AVISO LEGAL - CLÁUSULA DE PRIVACIDAD
Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es usted el destinatario indicado, queda informado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.
Follow ups
References