← Back to team overview

openerp-dutch team mailing list archive

[Bug 531507] Re: [PATCH] account module quite severe issues with closing fiscal years

 

Yep Loeki, we rewrote it from scratch. Why? Cause the fiscalyear closing
wizard was not really applicable on Spain as it was implemented:

  - The OpenERP default wizard just creates an opening move, where it
moves the balances/detail/unreconciled amounts of accounts that need to
be closed to a centralized counterpart. In Spain we must create instead:

        + Loss&Profit regularization moves (dated Dec 31th): Moves all the balances of (non-view) profit an losses accounts into a 'total fiscal year profit' account. All the P&L accounts must have balance 0 after this. (This is the only part that the OpenERP fiscalyear closing wizard would cover)
               This is used to calculate taxes based on the yearly profit (the 'total fiscal year profit' account balance). 
                    
        + A closing move (dated Dec 31th): Moves all the balances (we don't do 'detailed' nor 'non conciled' closings) of all the (non-view) accounts against each other (just adds them), without using a centralized counterpart. The move is self-reconciled. This move should be balanced, and all the accounts should have balance 0 afterwards. 
                This is used mainly for checking that there are not accounting errors.

        + An opening move (dated Jan 1st): After the previous move all the accounts have balance 0 (we just cleared out all the accounts), we must 'reopen' them doing the inverse move of the closing one (reverse it), so in the end we preserve the old balances (but the L&P accounts remain at 0). This move is also self-reconciled.
                This is used to preserve the old amounts.

All this closing moves are usually created in March (but use the given
dates), so the opening period may have moves already.


But we also did lots of improvements:

  - Validates your accounting: Checks whether all the moves are
balanced, whether all the moves have valid dates (on Spain the period
and date must match), checks whether all the moves on the fiscal year
have been closed...

  - Its much faster that the OpenERP wizard (just does a "create" per
full move VS the default wizard doing a create per move line; remember
that each create means constraint checking...).

  - It doesn't time out. A progress screen is shown instead. <== This
might be used on the standard wizard, no more timeout messages when you
have a lot of accounts and the user waiting while wondering whether is
it still running or it did hang.

  - Makes easy to keep track of the end-of-year operations (you can
review easily those moves it just created) and guides the user.

  - It closes the fiscal year and periods when you confirm the wizard.
No need to use a separate wizard.

  - Its easy to cancel everything. Just press the Cancel button, and the
wizard reopens the fiscal year and periods, and unreconciles, cancels
and deletes the moves. Easy and clean.


So yes, this wizard was designed for Spain, but it has some interesting ideas that might be used on the base wizard :)

-- 
[PATCH] account module quite severe issues with closing fiscal years
https://bugs.launchpad.net/bugs/531507
You received this bug notification because you are a member of OpenERP
Dutch Team - Nederland, which is the registrant for OpenERP Dutch
Lokalisatie Project - Nederland.

Status in OpenERP-Dutch-localisation: Fix Committed
Status in OpenObject Addons Modules: New

Bug description:
We have identified two major issues with the wizard_fiscalyear_close in the account module in any 5+ version of OpenERP:

1) As noted in the wizard_fiscalyear_close.py (~line 145):
                #TODO: this query could be improved in order to work if there is more than 2 open FY
                # a.period_id IN ('+fy2_period_set+') is the problematic clause
2) When a reconcile crosses years AND the reconciliation in the new years contains N entries, each reconciled entry in the old year will get reported N times instead of once.

These bugs will quite possibly crap up closing a year, and we consider them therefore to be quite important.