-
- Downloads
[FIX] account: prevent sequence number gap in Accounting Firms mode
### Summary
When modifying the accounting date of an invoice in Accounting Firms
mode, Odoo always generates a new invoice sequence number. This behavior
can introduce gaps in the sequences.
### Reproduction Steps
1. Activate Accounting Firms mode.
2. Create a new Draft Invoice and save it.
3. Create a second Draft Invoice and save it.
4. Modify the accounting date of the first invoice and save it.
5. Observe that the first invoice's invoice sequence number is updated
to the next sequence, creating a gap.
### Fix
Recompute the sequence only when the new date falls into a different
fiscal year.
opw-3164537
closes odoo/odoo#117007
Signed-off-by:
William André (wan) <wan@odoo.com>
Showing
- addons/account/models/account_move.py 7 additions, 10 deletionsaddons/account/models/account_move.py
- addons/account/models/sequence_mixin.py 32 additions, 16 deletionsaddons/account/models/sequence_mixin.py
- addons/account/tests/test_sequence_mixin.py 56 additions, 1 deletionaddons/account/tests/test_sequence_mixin.py
Loading
Please register or sign in to comment