Skip to content

Commit

Permalink
[FIX] l10n_do_accounting: fix seq with same prefix in diferent year
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-pcg committed May 7, 2024
1 parent c3a74e2 commit 2370db2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions l10n_do_accounting/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,3 +1020,11 @@ def unlink(self):
_("You cannot delete fiscal invoice which have been posted before")
)
return super(AccountMove, self).unlink()

@api.model
def _deduce_sequence_number_reset(self, name):
if (self.l10n_latam_use_documents
and self.company_id.country_id.code == "DO"
and name not in ['/', False, '', '1']):
return 'year'
return super(AccountMove, self)._deduce_sequence_number_reset(name)

0 comments on commit 2370db2

Please sign in to comment.