-
- Downloads
[FIX] account: bank statement lines indeterminist order
The order of a bank statement lines is entirely done on the sequence: `_order = "statement_id desc, sequence"` The `create` method of `accounT.bank.statement` is overriden to handle the sequences of each line. The `write` method as well, except that the set of the sequences lines is done after the call to `super`. So, if you add several new lines to a bank statement, the order of the line you just added can be different before and after save, as the sequence of these new lines are not set before actually writting them on the bank statement. The widget `handle` serves this sequencing purpose. The fact it isn't used here is most-likely because it did not exist at the time this was designed. Besides, this gives the possibility to the user to add a new line and re-order it where he wants. For instance, when manually entering a bank statement, a user could skip unintentionally a line. If he would like to add it at the right place, before this revision, he would have to delete all the lines coming after the line he skipped. Now, he can add it at the end, and re-order it where he wants. What is done in the overriden `create` and `write` is now useless, but we left it for retro-compatibility purposes, for databases updating their sources without updating their views. opw-667541
Loading
Please register or sign in to comment