Skip to content

Conversation

@etobella
Copy link
Member

@etobella etobella commented Nov 8, 2025

  • made_sequence_gap field in account.move

@pedrobaeza pedrobaeza added this to the 18.0 milestone Nov 8, 2025
@pedrobaeza pedrobaeza merged commit 49f28dd into OCA:18.0 Nov 8, 2025
4 checks passed
@etobella etobella deleted the 18.0-imp-account branch November 8, 2025 11:45
@remi-filament
Copy link
Contributor

Hi @etobella as reported here : OCA/account-financial-tools#2133 (comment)
Initializing the field made_sequence_gap to True causes issues during migration of database with account_move_name_sequence installed (which disable the fields sequence_prefix and sequence_number)

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...
Does anyone have a better idea ?

Best Regards

@etobella
Copy link
Member Author

@remi-filament

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.
In any case, there are 2 options:

  1. Add a verification of having that module installed in order to skip it.
  2. Follow the script and then make the changes directly in the module.

@pedrobaeza
Copy link
Member

For the record, I strongly advice to not use that module.

@remi-filament
Copy link
Contributor

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.

@pedrobaeza
Copy link
Member

@remi-filament IMO, that customer whims shouldn't be satisfied, as they are more harmless than other thing.

@remi-filament
Copy link
Contributor

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...

@pedrobaeza
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants