OCA/account-financial-tools

[16.0] account_move_name_sequence side effect : reporting holes in sequence

remi-filament opened this issue · 1 comments

Module

account_move_name_sequence

Describe the bug

When using account_move_name_sequence, the sequence_number are not computed anymore (as per

sequence_number = fields.Integer(compute=False)
)

In v16, 2 new functions have been added to check if there are potential holes in sequence, based on sequence_number :

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Install account_move_name_sequence
  2. Configure customer invoice journal to use refund sequence
  3. Create a customer invoice and validate
  4. Create a credit note on this invoice (with modify option) and validate

You get the following display on accounting dashboard (Gaps in the sequence) :
image

And the red names on account invoices tree view :
image

Expected behavior
These warnings should not be displayed if there are no real gaps in sequence

Additional context
I am not sure how to fix it, the easiest way would be to not compute these fields anymore (as for sequence_number), although it feels like we are losing some functionality here, but I cannot think of a correct way to check there a no gaps once you use sequence.

Fixed with #1615