-
-
Notifications
You must be signed in to change notification settings - Fork 785
[18.0][IMP] account: Pre-compute fields in order to make it faster #5447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
etobella
commented
Nov 8, 2025
- made_sequence_gap field in account.move
|
Hi @etobella as reported here : OCA/account-financial-tools#2133 (comment) That would mean that in case these fields are not used (for instance in account_move_name_sequence) we would need to reset all made_sequence_gap back to False and therefore would not make migration faster... Best Regards |
|
It will be faster for just one reason: Now it is done with SQL, if you have that module, it will be done by python code.
|
|
For the record, I strongly advice to not use that module. |
|
Thanks @etobella I have made a PR on account_move_name_sequence to add a new migration script to set field to False. I understand your point of view @pedrobaeza , yet there are some corner cases which are not properly handled by Odoo default sequence-guessing, like if you want to have year or year and month in your sequence but still do not want to reset sequence to 1 on each year or year-month change... In these cases, I have not found any other solution than to bring back ir.sequence where you can choose to not use range_year but only year so that sequence is never reset. |
|
@remi-filament IMO, that customer whims shouldn't be satisfied, as they are more harmless than other thing. |
|
Well, this is what we are using internally, and it was working properly before Odoo 14. Yet it is true that we could change that to accomodate with Odoo limitations added in v14 :) Although, for other customers in the same case, it is a bit harsh to explain to them it is a whim when it was working properly on previous version and they have to change the way they are doing accounting because of migration to newer version... |
|
I won't say "whim" to him, but only tell them that now it's not possible because now the system is better in this and that about sequences (like not having to manipulate the next value if removing the last invoice), but they have to resign from that numbering. And they usually accept. And if not, then "motivate" them with a substantial increase in the maintenance fee (which is justified, as there can be a lot of problems with that module). |