← Back to team overview

openerp-expert-accounting team mailing list archive

[Bug 519133] Re: [5.0] The Centralisation check is required at write() as well.

 

Hello

Of course, I agree that in a centralized journal, you cannot create more
than 1 move. The problem is not here.

Let's take an example without/with the patch :

Without the patch :
- When we work in a centralized journal, the entries encoding works fine. When we add a move line, the centralized move lines compute well. We can add more move lines without any problem. The move line dates can be different on each move line (that's ok). The centralized move line take the date of the last day of the period (that's ok too). At the end, we have many move lines with different dates and 2 centralized move lines at the end of the period. This behaviour is correct.
The only problem is that when we want to modify an existing move line in the journal. When the modification is written, all the dates for each move line are modified.
For example, before modifying a centralized move for july, we have move lines for 2nd, 4th, 5th, 13th... of july and 2 centralized move lines for 31th of july. If we modify the name of the move line for the 5th of july, all the move lines dates (even the 2 centralized move lines) are updated at the 5th of july. This behaviour is not correct : The dates should not be updated in the case of a centralized journal.
Therefore, I think the write function should check if the journal is centralized or not. If it is centralized, the write function should not update all the move line dates but it still should compute the centralized move lines amounts. That's all.

With the patch :
- We cannot create several move lines with different dates in the centralized journal because we have this message. I think it is a regression because before applying the patch, it was possible. By the way, we don't want to create several moves on the period, we only want to create one move with several move lines inside which have different dates. One more time, it was possible before applying the patch.
So we cannot test any further. We are stuck here.

I hope these explanations are useful.

If not, do you mind having a phone call (I have a partner&support contract with OpenERP) ?
Or do you need screenshots ?

Regards

-- 
[5.0] The Centralisation check is required at write() as well.
https://bugs.launchpad.net/bugs/519133
You received this bug notification because you are a member of OpenERP's
Accounting Experts, which is a direct subscriber.

Status in OpenObject Addons Modules: In Progress

Bug description:
Hello

When modifying an entry line in a centralized journal (journal.centralisation=true), all the entry line dates get modified and take the modified entry line value.

The entry line dates should not be changed

I guess the solution is in the write function in account_move_line.py where we should find some 'if journal.centralisation:...' as it is in the create function.

Regards